The Problem
Lines 124-126 Work great for spawning the NPC, however after the NPC spawns it ignores line 127, and will go through obstacles!
Why is that?
Develop games in your browser. Powerful, performant & highly capable.
Try adding For Each guard on created to your event.
Ive have just tried this, and it wouldn't work.
Ive tried changing the order, combining the two, and including it within the spawning event.
maybe im using the wrong expression.
I'm using
https://gyazo.com/cedba065b6fe95b37b20c7fa32919422
Try removing the on created part. Also you may need to move it into a sub event under where the enemy is created so it doesn't run every tick.
https://gyazo.com/0546bd7947b1a3df6a948699adbd3198
That didn't work either.
I also tried using the pick all instances, and On every tick, just to see if it worked. It didn't.
Did you try moving the 3 obstacle actions directly below the spawn enemy action in the same event?
https://gyazo.com/5017efbe4cdc5acc20349148a907ba0b
Didn't work.... unless I misunderstood that.
Are you able to post your capx?
https://www.dropbox.com/s/qvrvfj111axqp21/TMK.capx?dl=0
There you go.
Sorry, I don't have the correct plugins to load your capx. Hopefully someone else can help you out.
I haven't tried testing this is... Add a wait 0 to the first line of the on-created actions. I suspect that the event is triggering before the object is registered in the line of sight behaviour, so a small delay should fix the problem.