H
HenrikDK
Guest
I'm trying to use a very small amount of events, and it's a bit hard with the small amount of programming knowledge that i have... I made a variable saying this character have 2 health;", if a collision with obj_bullet is detected, destroy object bullet and - 1 health of this character. If the character have a health number equal to 0 or lower, destroy object..
Create:
///Variables
enemyhp=2;
Step:
if (enemyhp <= 0)
{
instance_destroy();
}
if place_meeting(x,y, obj_bullet)
{
enemyhp -= 1;
}
if place_meeting(x, y, obj_player)
{
instance_destroy();
}
Create:
///Variables
enemyhp=2;
Step:
if (enemyhp <= 0)
{
instance_destroy();
}
if place_meeting(x,y, obj_bullet)
{
enemyhp -= 1;
}
if place_meeting(x, y, obj_player)
{
instance_destroy();
}