I can't think of any reason to favor declaring globals as one instead of zero. But "globalvar" is a GameMaker: Studio construct; ENIGMA just has you say "global var" instead. I can't tell if the compiler recognizes that you are trying to declare a global, or if it just assumes you left our two semicolons and wanted to say a bunch of variable names for no reason. The point is, it's possible globalvar
just isn't working (although it seems to be declared in actions.h
. Try printing the value in another object to make sure it's being persisted.
Otherwise, it could be an event ordering issue. Try setting it to what you mean instead of to one and then the correct value later.