Skip to content

Instance Variables

Instance variables is usually another term for object variables.

Variables defined on objects are, during the game, available on each instance of the object living on the scene. This means that if you have an object "Tree", with a variable "LifeAmount", and that you put two "Tree" on the scene, you will have 2 instances of "Tree". At the beginning of the scene, these instances will have both a variable "LifeAmount", with the same value (the one entered in the variables editor). Then, during the game, according to conditions and actions, the value of each can evolve.