NPC Road

  • #1, z gokutaFriday, 30. June 2017, 00:05 hodinky 7 years ago
    Hi, i'm new using Visionaire so i hope some help smile

    How i can make a NPC walk from 'x' position to 'y' position , return to 'x' and again walk to 'y' continuosly ?

    Thanks, and sorry for my bad english.

    Bažant

    2 Posts


  • #2, z ke4Friday, 30. June 2017, 00:13 hodinky 7 years ago
    You could set up a loop like this:

    1 Send character to position
    2 Wait until character stops
    3 Send character to position
    4 Wait until character stops
    5 Jump to actionpart #1

    No scripting required.

    Zabiják klíčů

    810 Posts

  • #3, z gokutaFriday, 30. June 2017, 00:31 hodinky 7 years ago
    Thanks !!, it works perfectly.  Now i have new question:

    It's possible to make NPC stop if it the Character collides with him?

    Bažant

    2 Posts

  • #4, z afrlmeFriday, 30. June 2017, 01:55 hodinky 7 years ago
    Thanks !!, it works perfectly.  Now i have new question:

    It's possible to make NPC stop if it the Character collides with him?
    Yes, but it's a bit more complicated as you need scripting to check if the character enters a radius that you define for the npc. There's a script I wrote a while ago that you could edit for this purpose here. It needs some edits though as it's currently for checking if mouse cursor is inside of a specified radius, but it shouldn't be too hard to modify - it's late here at the minute though & I've not got my thinking cap on. Sorry.

    Imperátor

    7285 Posts