TwinTails - My method is pretty much the same as using global constants - I just put them in an object because I NEVER use global variables; mostly because you can't sub group globals while you can use objects to sub group variable names... without subgrouping variables I can end up with hundreds of globals... and their names have to be stupid long to keep them organized (i.e... Character_FinalBoss_AtackStrength_01) this in turn makes some of the events harder to read...
In the end I create an object PlayerFunctions or BossFunctions... I then tend to name all variables according to certain conventions that allow me to keep them organized yet still easily accessible in that huge drop down list* ... and since I can sub group objects, finding what I want quickly becomes easier.
player_fm.caculateAtackVector (m = shortcut for math, f shortcut for function)
then that variable would be set to something like: "Player_Functions_Math_CalculateAtackVector" ... A real pain to spell out every time you want to call it... The beauty of it is that you never even need initialize any of these data storage objects as you normally just need their variables as constants.
While I am thinking about that dropdown list.... I think it is stupid*. It works when you have like 4 variables but not when you have dozens, if not hundreds... You can't even type in the name of the variable... you have to select from the list... but in other cases you can actually type it in. For example:
If I set a variable to some value, I have to select the variable from a giant drop down list. Only the first keystroke works to find it, but as I use v_before most variables this does me no good.
The reason I use v_before most variables is because If I do the following:
Player.physics.velocityX = V_somevariable .... and I haven't organized my variables its hard to find the variable in a list of all the sprites expressions and so on... Again, the default conventions are nice, but not in large projects. The bigger the project the more tedious some things become.
I would love a data object that simply stores variables, instead of having to use a sprite...