Just wondering if there's a way to set up an Enum. I've created an input handler that reads the input state of 16 different inputs ( replicating a gamepad without being tied to the Gamepad plugin ).
This handler uses a string that stores all 16 states, separated by commas, so when I test an input, I just tokenAt() the index I want for the specific input I want to test. Is there any way to tie these index values to actual string names for readability and convenience?
I'm sure I'll remember the index order of all my inputs eventually... but it'd sure be nice to just type the name of the input I want and have the appropriate value serve as the actual index to be read from.
current = "int( tokenAt( obj_inputHandler.inputState, 0, ", " ) )
desired = "int( tokenAt( obj_inputHandler.inputState, Up, ", " ) )
Is this possible or will have to come up with a workaround?
Thanks in advance,