J
jana
Guest
I'm getting an error, saying that a variable in an object's collision event is not set before being read. I declared the variable in the object's create event:
I want each instance to have it's own copy of this variable that will be updated every time the object is involved in a collision.
Here's the error:
Code:
var vib = 0;
Here's the error:
Where else would I put an instance variable besides the object's create event if I need it stick around so it can be updated throughout the game?############################################################################################
FATAL ERROR in
action number 1
of Step Eventobj_player
for object obj_eOrb:
Variable obj_eOrb.vib(100002, -2147483648) not set before reading it.
at gml_Object_obj_eOrb_CollisionEvent_4_1 (line 1) - vib += 1;
############################################################################################