Walking NPC within a scene

  • #1, z lupoFriday, 14. June, 09:59 hodinky 3 months ago
    I would like to see one of the NPCs to walk from left to right within one scene. It doesn`t need to chance screens. It this possible with the sandard interface of visionaire or do I need to script LUA?

    The goal would be to have the character walk from position A to posistion B, then to play an animation and afterwards return to pos A where it loops again after some time. 

    It should be possible to talk to the NPC during the whole process at any time.
    I cannot find the right approach for it. Any idea? 

    Bažant

    8 Posts


  • #2, z esmeraldaFriday, 14. June, 12:27 hodinky 3 months ago
    you can create an action (type: called by other action) and in this action add the actionparts to send the npc to the positions and loop it. Wrap all in a condition to stop the loop.

    - if condition "npc_walking" is true
       - send npc to position B and wait
       - play animation ... and wait
       - send npc to position A and wait
       - jump to actionpart #1
    - end

    call this action at the beginning of the scene or whenever you need it

    in the action when talking to the npc
    - quit the action
    - change the condition "npc_walking" to false
    - start your dialogue

    after the dialoge, change the condition back to true and call the action again.

    quick example: 

    Zabiják klíčů

    525 Posts

  • #3, z lupoFriday, 14. June, 22:35 hodinky 3 months ago
    This solution works great! Didn`t know there is a " jump to actionpart #1". Now, I know.
    Thank you!

    Bažant

    8 Posts

Napsat příspěvek