evildead9000
Member
Within my step event of obj_Enemy_1 I have three states. Currently, in the "Attacking" state I have the following:
I want the enemy state to change when it's weapon hits obj_Player1.
For now I've been testing enemy behavior change and just want whatever enemy that fired and hit player1 to move down the screen at y+=10, so I know its state changed.
However, nothing is happening. Not sure what else to try and I welcome any guidance.
Code:
case "Attacking":
var attack_angle = point_direction(x, y, obj_Player1.x, obj_Player1.y);
var shot = instance_create_layer(x, y, layer, obj_Enemy_laser);
shot.direction = attack_angle;
shot.speed = 8;
if instance_exists(shot){
if place_meeting(shot.x, shot.y, obj_Player1){
Enemy_1_State = "Aggressive";
}
}
break;
case "Aggressive":
y+=10;
break;
For now I've been testing enemy behavior change and just want whatever enemy that fired and hit player1 to move down the screen at y+=10, so I know its state changed.
However, nothing is happening. Not sure what else to try and I welcome any guidance.