Talking while walking

  • #1, z ke4Monday, 07. November 2016, 20:39 hodinky 8 years ago
    Hi,
    would that be possible? Only thing i can think of is another outfit with mouth animation in the walking cycle. Would not work together with display text option though.

    Zabiják klíčů

    810 Posts


  • #2, z afrlmeMonday, 07. November 2016, 21:01 hodinky 8 years ago
    You can actually create multiple animations inside of the talk, idle & walking animation sections which will automatically add any duplicated directions to a new animation index value, so... what you could do is:

    1a. create a version of your walk animation for each direction with a talk animation & then add it to the current outfit or...

    1b. create a new outfit (probably the easier option & you'll know that it will work as I've had issues when trying to use the animation index method).

    2. swap out the current animation index to 1 or (I forget if the default value is 0 or 1), when you want the character to play the talking & walking version & then back to 0 or 1 (again I don't remember the default value) when you want to revert back to the regular walking animation.

    3. as for the walking & talking, you could set it as a background text with a pause action part after for the lenth the text is supposed to be displayed before moving onto the next action in the list, but be warned that background texts can't be skipped without Lua script (I actually shared a script on the wiki ages back for skipping background texts) & also that while they are being displayed & while you still allow the player to be able to interact with the game that they could trigger another display text or action that they aren't supposed to do, so I really only recommend using background display/narration texts during sections where you kill player interaction. Narration text is also another possibility. I forget if you are forcing the text positions with the textPosition hook or letting them display above the characters head.

    Imperátor

    7285 Posts

  • #3, z ke4Monday, 07. November 2016, 21:25 hodinky 8 years ago
    I want to talk a character chasing the main character. I can't tell if the character will walk or stand as it depends how the main character will move.

    However even thoug i would use another outfit / index to create walking animation with a talk animation. Vis won't either move wih the character and the character will walk on the place or won't run the display text action when the character would be walking, no?

    I'm forcing the text positions with the textPosition hook.

    Zabiják klíčů

    810 Posts

  • #4, z afrlmeMonday, 07. November 2016, 21:43 hodinky 8 years ago
    You can use a loop to check the state of a character.

    function checkCharacterState()
    
     if Characters["Tom"].CharacterState == 3 -- character is walking
    
      -- do something if walking
    
     elseif Characters["Tom"].CharacterState == 2 -- character is idle
    
      -- do something if idle
    
     else -- character isn't walking or idle
    
      -- do something if character isn't walking or idle
    
    end
    
    
    
    registerEventHandler("mainLoop", "checkCharacterState")

    Imperátor

    7285 Posts

  • #5, z ke4Friday, 11. November 2016, 13:08 hodinky 8 years ago
    That's handy. Excuse me if i'm missing something. This can work only with naration texts / object texts. I still can't see a way to make it work with the classic display text action part.

    But i guess it should not be an issue to use the naration text. I want it to not be skippable with left click anyway as i want the player to be able to play during this. I suppose i could either end the text if the player would click on something else ( i don't want to display 2 texts at the same time ) or wait until the "background" text is finnished.


    Zabiják klíčů

    810 Posts

  • #6, z afrlmeFriday, 11. November 2016, 13:34 hodinky 8 years ago
    If you want to kill background texts, then you will be needing something like this script I wrote ages back.

    Imperátor

    7285 Posts

  • #7, z ke4Friday, 11. November 2016, 14:00 hodinky 8 years ago
    Alright, thanks mate.

    Zabiják klíčů

    810 Posts