So I want to implement the A* (Pathfinding) and Line Of Sight algorithms for my thesis.
Which is where the enemy will detect and chase the player when it enters the range of the Line Of Sight and also I want to make the enemy able to detect obstacles, so if the player hides behind an obstacle the enemy will stop chasing and also the enemy will stop chasing if the player manages to escape from range.
Note : I want to make this without a plugin.
Pseudocode example:
If Player Gets into enemy range
Turn on alert audio and balloon icon then Chasing Player
if else Player hides behind obstacles or get out from the LOS range
Enemies stop chasing players
else
Enemies move randomly
Is it possible to make code like the one above in the form of a script call on a custom movement route?
Which is where the enemy will detect and chase the player when it enters the range of the Line Of Sight and also I want to make the enemy able to detect obstacles, so if the player hides behind an obstacle the enemy will stop chasing and also the enemy will stop chasing if the player manages to escape from range.
Note : I want to make this without a plugin.
Pseudocode example:
If Player Gets into enemy range
Turn on alert audio and balloon icon then Chasing Player
if else Player hides behind obstacles or get out from the LOS range
Enemies stop chasing players
else
Enemies move randomly
Is it possible to make code like the one above in the form of a script call on a custom movement route?