Walking NPC within a scene

  • #1, by lupoFriday, 14. June, 09:59 6 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? 

    Newbie

    8 Posts


  • #2, by esmeraldaFriday, 14. June, 12:27 6 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: 

    Key Killer

    533 Posts

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

    Newbie

    8 Posts

Write post