Creating a custom variable for various states (i.e vaulting, attacking)

NOTE: I’ve posted this question in the blueprint scripting and C++ programming as I’m not sure which would give me the solution.

Hi,

I’m want to create variable that I can easily use to check what ‘mode’ an AI is in. I.e is it jumping, moving, hiding, attacking etc. Right now the way I’d do it is have a bool for each of these individually which would get messy. Was wondering if there’s a way to create a custom variable with custom values that I could set and unset.

So a variable I could get and set to the value: jumping. Then in another function, for example, the check would be ‘does state/mode = jumping’ etc

Thanks,

Jack

You could use enumeration. Right click content browser=>blueprints=>enumeration create inside states, and use them whenever you need to set or check them.

Thanks that’s perfect.