Legacy GM Variable for an object?

A

AtLantiSs

Guest
Ok so in my create event I have this:
Code:
MoveTowards = "N/A";
go = 0;
In my step event, the objects constantly defines what MoveTowards is

Code:
if go = 1
{
MoveTowards = tag_aly; //An Object
}
else
if go = 0
{
MoveTowards = tag_defend; //An Object
}
However I get this error...

FATAL ERROR in
action number 3
of Step Event1
for object obj_Marine:


Variable <unknown_object>.y(1, -2147483648) not set before reading it.
at gml_Object_obj_Marine_StepBeginEvent_3 (line 96) - mp_potential_step_object(var1.x, var1.y, 1, MoveTowards)
############################################################################################
 

TLH14

Member
MoveTowards isn't the problem. You seem to be calling for the coordinates of an object that doesn't yet exist.
 
P

ParodyKnaveBob

Guest
I don't believe this is an instance problem:

The error says obj_Marine Begin Step Event, action 3 has mp_potential_step_object(var1.x, var1.y, 1, MoveTowards) without var1 referring to an object in the Resource Tree. Right? $:^ J

I hope this helps,
Bob
 
Top