J
joshua huxley
Guest
I use gm2 and I keep getting this error when I attack my enemy, and I could not find a solution, help please
############################################################################################
ERROR in
action number 1
of Step Eventobj_enemy_slime
for object obj_hitbox:
The instance does not have an associated physics representation
at gml_Object_obj_hitbox_Collision_d5eeb677_f035_4c5b_a7d0_e45a8e87616e (line 10) - physics_apply_impulse(x,y,knockback,knockback);
############################################################################################
this is the code:
if(other.id != creator)
{
other.hp-=damage;
var dir = point_direction(x,y,other.x,other.y);
var xforce=lengthdir_x(knockback,dir);
var yforce=lengthdir_y(knockback,dir);
with(other)
{
//happens inside enemy
physics_apply_impulse(x,y,knockback,knockback);
}
}
############################################################################################
ERROR in
action number 1
of Step Eventobj_enemy_slime
for object obj_hitbox:
The instance does not have an associated physics representation
at gml_Object_obj_hitbox_Collision_d5eeb677_f035_4c5b_a7d0_e45a8e87616e (line 10) - physics_apply_impulse(x,y,knockback,knockback);
############################################################################################
this is the code:
if(other.id != creator)
{
other.hp-=damage;
var dir = point_direction(x,y,other.x,other.y);
var xforce=lengthdir_x(knockback,dir);
var yforce=lengthdir_y(knockback,dir);
with(other)
{
//happens inside enemy
physics_apply_impulse(x,y,knockback,knockback);
}
}