D
Disgolaxe
Guest
The projectile I have named "contact" has this in it.
if instance_place(x,y,Actor) and Actor.hit {
Actor.HP -= 1;
instance_destroy()
}
else
if instance_place(x,y,Actor) and Actor.blockhit {
Actor.HP -= 1 - Actor.block;
instance_destroy()
}
"Actor" is the parent object.
"Enemy" is the child object.
I must be missing something crucial about how the parent-child function works in GML, because when I shoot at Enemy it doesn't register the collision with the projectile, whereas if I shoot the parent object it works as intended. Any advice as to why this is?
if instance_place(x,y,Actor) and Actor.hit {
Actor.HP -= 1;
instance_destroy()
}
else
if instance_place(x,y,Actor) and Actor.blockhit {
Actor.HP -= 1 - Actor.block;
instance_destroy()
}
"Actor" is the parent object.
"Enemy" is the child object.
I must be missing something crucial about how the parent-child function works in GML, because when I shoot at Enemy it doesn't register the collision with the projectile, whereas if I shoot the parent object it works as intended. Any advice as to why this is?