Hi vancouver
I try to explain it to you, but first have you red the manuel already?
Event Variable (=Global/Local Variables)
Instance Variable
What are the diffrences?
First a Instance Variable is only available for objects (sprite, tiles). You can use them to identify your object, for instance we have 3 buttons.
- Button 1 has the Instance Variable 1
- Button 2 has the Instance Variable 2
- Button 3 has the Instance Variable 3
So now you can use the one Button sprite for doing 3 diffrent jobs. So lets see how the event will look like
One Touched Object "Button"
- Compare Instance Variable = 1 do Action 1
- Compare Instance Variable = 2 do Action 2
- Compare Instance Variable = 3 do Action 3
So you don't need 3 diffrent buttons, one for each action. Awesome right?
So now to the global variables. These variables aren't bound on any objects. You can use them to store your scores, define some stats or what else you want to do Also you can safe the stats of variables in many diffrent ways, for example in a WebStorage. But note you can only safe numbers in webstorage.
If you want to learn more about the variables and how to use them check the manuel links above, try some capx file demos or ask us, the community
Good luck with your projects!