Download

AI walking to target (noob question)

hi. (excuse my english)

its my first time with a engine, sry if its a easy question.

I want a AI walking to 3 targets in a navmesh, i got this working easy, but the problems its i need a delay for each “Simple move to location” to make sure arrive to the target location.
The next think i try what a sequence, thinking the secuence going to wait to finish de “Simple move to location” after activa “Then 1”, error…

My next try was Get my AI location and compare with the Target Location for have a true/false condition for known if the AI arrive the target, but my AI character never arrives at exact position (example target its X:400… AI stopped at X380…)

how can i known when my AI arrive to the target?
how can i do for send the AI to 3 targets without using delays?

thx

An easy method i’ve used is to check if the AI has any velocity.

If it doesn’t the bot has reached it’s target and cen be re-assigned

2014-04-15 10_25_15.png

make Cazblue nodes as function and call it for eg. Did_it_stop

Then add similar function that returns distance to destination:
substract: “destination vector” minus “current location vector”, calculate results length, and if less that 50, call it “Destinatnion reached”

Last check if “did it stop” and distance functions returned true.

thx for responses.

i finally do this:

http://i.imgur.com/HYTZZoH.png There are a connection error in the last overlap event (jump the banch)

Change “Target destination” with a Trigger Box and “Simple move to location” to “simple move to actor”, and on overlaps check if the vectors of overlap actor and desire actor are equal (avoiding other actors activate), if they are equal move to the next trigger box.

good solution?