M
Meve
Guest
I'm having problems with my collisions, I want to subract 1 from the hp every time the monster hits the target until Nasu_obj destroys itself.
I've made a collision event with my monster_obj:
in the creation code:
and in my step:
But when I have a collision with my monster obj the program tells me
Unable to find any instance for object index '4' name 'Nasu_obj'
at gml_Object_monster_obj_1_Step_0 (line 64) - if ( x < Nasu_obj.x)
I've made a collision event with my monster_obj:
Code:
--hpm;
Code:
hpm = 3;
Code:
if hpm = 0
{
instance_destroy();
}
Unable to find any instance for object index '4' name 'Nasu_obj'
at gml_Object_monster_obj_1_Step_0 (line 64) - if ( x < Nasu_obj.x)
Code:
if ( x < Nasu_obj.x)
{
image_xscale = 1;
}
else
if (x > Nasu_obj.x)
{
image_xscale = -1
}