Waypoint Issues

Hey all,

I’m having a bit of an issue with my script here that controls (so far) my enemy. I know it’s messy, right now I
I’m just trying to get the basic movement down for patrolling, chasing, and attacking. For some reason, my enemy only travels to one waypoint, but then stops and doesn’t travel to the other waypoints… Any ideas? Thanks in advance!

2488003–171599–CreatureAI.js (1.91 KB)

Have you tried attaching the Monodevelop debugger and seeing where things are going?

There are some good tutorials out there for learning how to use the debugger, but you can also learn a great deal about what your code is doing by sprinkling in strategically-placed calls to Debug.Log() to display certain conditions, such as "Arrived at next waypoint, waypoint is now " + curWP and stuff like that to guide you into the problem.