O
Oniric
Guest
Hi guys, so I don't really understand what is going on here. Basically, im trying to add a knockback to my zombie enemy but it's not working. I've basically created 2 script states. Zombie_Movement and Zombie_KnockBack
when the bullet hits the enemy the state changes to Zombie_Knockback, I then set an alarm within the zombie_knockback script but the alarm never runs.
This is the zombie_knockback code. (I'm aware that using -point_direction isn't the best way to do a knockback effect but I still want to understand why the alarm is not running.) Thanks.
direction = -point_direction(x,y,obj_player.x,obj_player.y)
image_angle = point_direction(x,y,obj_player.x,obj_player.y)
speed = zombie_speed;
alarm[3] = 60;
if zombie_hit = false
{
state = zombie_movement;
}
when the bullet hits the enemy the state changes to Zombie_Knockback, I then set an alarm within the zombie_knockback script but the alarm never runs.
This is the zombie_knockback code. (I'm aware that using -point_direction isn't the best way to do a knockback effect but I still want to understand why the alarm is not running.) Thanks.
direction = -point_direction(x,y,obj_player.x,obj_player.y)
image_angle = point_direction(x,y,obj_player.x,obj_player.y)
speed = zombie_speed;
alarm[3] = 60;
if zombie_hit = false
{
state = zombie_movement;
}