Use a condition to Skip/Ignore an entry in an Enum

Hello :slight_smile:

I am reasonably new to blueprints and/or code in general and I can’t seem to find a solution to my problem.

So the use case: I have an Enum with several entries for “combat styles” which are connected to state swapping for animation. I currently have it set up to loop through each Enum entry on button press.

Question: Is it possible to “skip” or “ignore” an entry in the loop based on a boolean?

simple example: If my enum has entries for 1h sword style / 2h sword style / reverse grip sword style / sword and shield style. Can I some how set up a condition, based on having a shield equipped, that would skip over or ignore “sword and shield style” and instead just continue to loop through the other entries?

Any help would be greatly appreciated :smiley:

You can set up a tick event or a timer(It depens from how do you call this enum) that had a branch before to entry in the enum switch. If this is true set enum state to shield and sword, otherwise set another state.

did you look into switch on enum node? i think it will fit your needs if i understood you correctly.

You can add node of “Switch on Enum” where Enum is your enum type.