I am having difficaulty making one of my enemies change from patrolling when theres no player in sight to when the player gets closer, he charges at the player. I am having trouble programing his LoS and having him switch to attack mode. What must I do to have my enemy go on a stampede when he sees the player?
Develop games in your browser. Powerful, performant & highly capable.
You can set some kind of state for the player with a variable, when enemy has line of sight switch it on and when no line of sight then switch off. When it's on have him chase the player etc