Hey there, pardon for quite the late response. My attention was caught somewhere else.
Your suggestion seems to be working well, and I decided to expand a little.
I’ll tell you what I’m aiming for right now.
I’m doing a simple card game where two players picks a card each and compares them. It’s essentially Rock Paper Scissor, but I added two other elements as well. I called them Light and Dark.
Dark would beat the three Fire, Water and Plant.
Light beats Dark, but causes Draw against everything else.
For now, I have a Card Slot actor, and Card Objects of each Element. When a Card Object of a is Spawned on top of the Card Slot Actor, an Element is Set. For this example, I’m using a Water Card.
I have also set the opponent to generate a random Element for testing purpose.
Once set, it calls the Game Mode BP and launch an element check, where your help came in.
BP Pastebin
Then I made what you suggested, and tried to make some additions.
BP Pastebin
The EnemyElement, PlayerElement and ElementIsBetterThan uses the same Enumerator list, and I looks like it should be fine.
As I’m doing more than just checking single elements for win, loss and draw conditions, I thought I needed to add some more nodes.
I was thinking a Switch could be useful, but I’m not quite sure I’m running into a dead end, or just unnecessary work.
You think I should use a different approach?