I am learning C2 and working on MAZE type of game. Life of me I cannot find the way to enemies chasing player. I have tried hard but sorry I do not know how to. Will someone help me. Please help
This is not for this category. Please move it to the appropriate forum.
Develop games in your browser. Powerful, performant & highly capable.
Add Pathfinding behaviour to 'Enemy' object.
'Enemy' Find Path To (Player.X, Player.Y)
'Enemy' On Pathfinding Path Found > Move Along Path
what plinkie said will work, however i would try and set the "find path" to an "every x seconds" condition. The cpu demand might become too intensive otherwise.
What Sargas said will work, too. I will usually set it every 0.1 seconds or so to give it that fraction of time be it needs to calculate a new path it the object being chased is always moving. The pathfinding acts rather smoothly then.
Sargas
Yes, good thinking!
Hey guys you are stars. Thank you so much. God bless you all. Thanks
Apart from me probably :(
And the point of bumping a 4 month old topic with this remark is?
plinkie is right