• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

enemy

Lucas_5

Member
Olá, há alguns dias estou tentando encontrar um bug no meu código para criar um inimigo. Se alguem puder me ajudar fico muito grato

etapa: if (distance_to_object (obj_player) <150 && hp> 0)
{
mp_potential_step_object (obj_player.x, obj_player.y, vel_enemy, true);
}
if (hp <= 0)
{
temporizador + = 1;
sprite_index = spr_enemy_dying;
if (temporizador> = 20)
{
instance_destroy ();
}

}

Crio:
hp = 10;
vel_enemy = 3;
temporizador = 0;
 
Top