No announcement yet.

Best Way To Follow Objects?

  • Filter
  • Time
  • Show
Clear All
new posts

    Best Way To Follow Objects?

    I have an ai and I am looking for him to move to an object (a tower). Which is simple however I have three towers and I want him to move to the first and when it dies move to the second on so on. I’m stuck on which approach I should take trying to tackle this.
    Last edited by AIMbOt-DoRitoS; 06-19-2018, 11:48 AM.

    Make an array of your target objects (in your case, towers)
    Use an integer variable as an index to access the target objects array. When a target (tower) dies, increase this integer by one.

    Step by step:

    Integer = 0.
    Access element 0 of array.
    (With the array output node plugged in) call "Simple Move to Actor"
    ---time passes---
    Tower dies.
    Tower increases integer by 1.

    Integer = 1.
    Access element 1 of array
    ... etc