K
Kijjum
Guest
I'm making a top-down sneaking game with visible lines of sight. I have it so if you're behind a wall, you can't be seen... but the sight cone is still drawn in the area that is not active.
This is what I have inside the enemy step event:
//Collision Line
if collision_line(x,y,obj_Player.x+-16,obj_Player.y+-16,obj_Wall,1,0) < 1 && scone.char_collision = true
{
show_message("You've been caught!");
room_restart();
}
scone.char_collision = false;
What I have:
What I want:
Any ideas on how to fix this? Or even if I would need a completely new approach?
This is what I have inside the enemy step event:
//Collision Line
if collision_line(x,y,obj_Player.x+-16,obj_Player.y+-16,obj_Wall,1,0) < 1 && scone.char_collision = true
{
show_message("You've been caught!");
room_restart();
}
scone.char_collision = false;
What I have:
What I want:
Any ideas on how to fix this? Or even if I would need a completely new approach?