movement of the npc character along the route

  • #1, by red363Wednesday, 10. March 2021, 19:43 3 years ago
    Greetings.
    There was a problem that I can't solve. I need to make the npc character move from point 1 to point 2. And upon reaching point 2, he returns to point 1. And so it is constantly (like patrolling). Is it possible to somehow implement it? Thank.

    Forum Fan

    101 Posts


  • #2, by esmeraldaWednesday, 10. March 2021, 22:16 3 years ago
    There is an action part called "jump to action part". With that you can create a loop.

    You could create a "called by other action" action and add the movement actions, then jump to the 1. action part. Call this action whenever the patrolling should start

    send character "npc" to position 1 and wait
    send character "npc" to position 2 and wait
    jump to action part #1

    kill the loop by action "quit action" or wrap the "jump" action inside an if query and change the condition to stop the loop.

    Key Killer

    513 Posts

  • #3, by red363Thursday, 11. March 2021, 01:22 3 years ago
    There is an action part called "jump to action part". With that you can create a loop.

    You could create a "called by other action" action and add the movement actions, then jump to the 1. action part. Call this action whenever the patrolling should start

    send character "npc" to position 1 and wait
    send character "npc" to position 2 and wait
    jump to action part #1

    kill the loop by action "quit action" or wrap the "jump" action inside an if query and change the condition to stop the loop.
    Thank you very match!

    Forum Fan

    101 Posts