Where can I store boolean variables? (or a boolean array)
For example, player states. I've tried using enum but it only allows 1 state of a variable and you need to make 2 different states.
With enums, you can do it like: Player has power up / Player has not power up
But that kind of logic is better off with using booleans. I'm using boolean variables at the moment but there's a lot of them and I was wondering if I can somehow store them in an array and then call/set them later at my convenience.
asked Oct 20 '16 at 02:51 AM in Blueprint Scripting
I would recommend just keeping different booleans if they are for different thigs and not in an array, since it will be very annoying to read and write to the right boolean. Boolean arrays are deffinatly avaible, (I have used one). If you have multiple booleans wich corresponts with each other I would recommend to use an array. In example if 2 out of 3 boolean are true do something. A place to store them could be the character BP, however some may argue that gamemode is better. I have only used the characterBP and save games to store variables that have to do with the character. Also if only one of the booleans can be true at the time I will suggest using enumerations since they make live a lot easier.
Follow this question
Once you sign in you will be able to subscribe for any updates here