Enemy behavior: walk in 'circles' and line of sight
Hello GameSalad brothers,
After watching alot of tutorial video's I have been trying to make my own game. Now I have a few questions I can't figure out by looking on the forums or watch on tutorial video's.
1) green is the player, red is the enemy. The player has to reach the end. The enemy walks in squares/circles following the path of the red (invisible) arrows. My first question is how to let the enemy walk in 4 different directions connected to each other? All I have seen is enemies patrolling left to right to left.
2) enemy sees the player. I want to implement a ''line of sight'' to the enemy and a ''!'' as in the picture. How do i do that? So if the player walks behind the enemy the enemy won't know but if the player walks in front of him the enemy will know. when the enemy sees the player I want to player to stop moving so that the enemy can walk over him and capture him.
3) the enemy walked over/collides/overlapses with the player. I want an animation where the enemy fights the player.
4) Change scene to game over after the enemy captured the player.
Hopefully I get some reactions!
Thank you. Gijs