Avram
Member
Hi all,
Can someone look at this code and please let me know what I'm doing incorrectly? What it *should* do is send my NPCs to a randomly chosen instance of a door but I receive the following error:
############################################################################################
ERROR in
action number 1
of Step Event0
for object obj_pedestrian_smart:
Unable to find instance for object index -4
at gml_Object_obj_pedestrian_smart_Step_0 (line 3) - mp_potential_step(inst.x, inst.y, 1, 1);
############################################################################################
gml_Object_obj_pedestrian_smart_Step_0 (line 3)
Here is the code I'm using:
CREATE
STEP
Can someone look at this code and please let me know what I'm doing incorrectly? What it *should* do is send my NPCs to a randomly chosen instance of a door but I receive the following error:
############################################################################################
ERROR in
action number 1
of Step Event0
for object obj_pedestrian_smart:
Unable to find instance for object index -4
at gml_Object_obj_pedestrian_smart_Step_0 (line 3) - mp_potential_step(inst.x, inst.y, 1, 1);
############################################################################################
gml_Object_obj_pedestrian_smart_Step_0 (line 3)
Here is the code I'm using:
CREATE
GML:
door_to_go = instance_find(obj_door_exit, irandom(instance_number(obj_door_exit) - 1));
GML:
inst = door_to_go;
mp_potential_step(inst.x, inst.y, 1, 1);
mp_potential_step_object (inst.x, inst.y, 1, obj_block);