Zachary_Alan
Member
Hello, I started getting errors in my pedestrian object after importing my game from GM 8.1 to GM:S 1.4. I don't get what this error is saying at all or what's causing it, I didn't make any changes other than adding physics to the car object.
___________________________________________
##########################################################################################
FATAL ERROR in
action number 2
of Step Event0
for object obj_ped:
Unable to find any instance for object index '103985'
at gml_Object_obj_ped_StepNormalEvent_2 (line 10) - if(state == 0 and instance_exists(myGuide)){
##########################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_obj_ped_StepNormalEvent_2 (line 10)
Here's the code in the script object if it would help
___________________________________________
##########################################################################################
FATAL ERROR in
action number 2
of Step Event0
for object obj_ped:
Unable to find any instance for object index '103985'
at gml_Object_obj_ped_StepNormalEvent_2 (line 10) - if(state == 0 and instance_exists(myGuide)){
##########################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_obj_ped_StepNormalEvent_2 (line 10)
Here's the code in the script object if it would help
Code:
///AI Core - state 0: walking
///Health
if(Health <= 0){
state = 2;
}
if(state == 0 and instance_exists(myGuide)){
injured = false;
///Walk towards guide
if(walk == true){
mp_potential_step( myGuide.x , myGuide.y , walkSpeed , false );
}
///Stop if close to guide
if(distance_to_object(myGuide) < 5 and !state == 2){
walk = false;
}else{
walk = true;
}
///Run over
if(instance_exists(obj_car)){
nearestCar = instance_nearest( x , y , obj_car)
if(instance_exists(nearestCar)){
nearestCar = instance_nearest( x , y , obj_car);
if(collision_circle( x , y , 20 , obj_car , true , true )){
if(nearestCar.speed > 1 and collision_circle( x , y , 5 , obj_car , true , true )){
state = 2;
}
}
}
}
///Bullet collision
if(collision_circle( x , y , 10 , obj_bullet , false , false )){
if(global.blood == true){
instance_create( x , y , obj_bloodHit);
}
Health -= obj_player.bulletDamage;
}
}