Having main character sit down

  • #1, by kristian_roMonday, 18. March 2019, 21:22 6 years ago
    Hi, I am trying to have my main character sit down in a chair. What is the proper way of solving this?
    I have tryed, changing outfits, but I cant lock him in the chair. When interacting with sceen objects he starts floating around. He dos not need to interact whit sceen objects while seated, it is only used to trigger a cut-sceen. After the cut-sceen any action should trigger him to get out of the chair. 

    -K

    Newbie

    16 Posts


  • #2, by sebastianMonday, 18. March 2019, 21:27 6 years ago
    you could try and set his walking speed to 0 in the "sit" outfit

    Thread Captain

    2346 Posts

  • #3, by darren-beckettTuesday, 19. March 2019, 18:01 6 years ago
    I set a flag when sitting down to block unwanted actions

    Great Poster

    384 Posts

  • #4, by MachtnixTuesday, 19. March 2019, 19:13 6 years ago
    What is a flag?

    Thread Captain

    1097 Posts

  • #5, by kristian_roTuesday, 19. March 2019, 20:50 6 years ago
    you could try and set his walking speed to 0 in the "sit" outfit
    Hmm, that certainly fixed him in the chair, but now I am not able to get him to rise. This is the action part I have set up (With this he is able to sit down and rise again, but wil float around while in the Sitting outfit.)

    if condition ´Sitting´ is false
    Change outfit of ´Blade´ to ´Sitting´
    Set character ´Current character´ to scene ´Current scene´ at position (742,481)
    Change condition ´sitting´ to true
    Else
    Change character speed to ´Current character´to 100
    Change outfit of ´Blade´ to ´Suit´
    Set character ´Current character´ to scene ´Current scene´ at position (780,508)

    (Both positions are within the walkable area)
    If I also add the "Change character speed of ´Current character´to 0" in under the IF statement. He wil not rise out of the chair.
    Any thoughts?

    Newbie

    16 Posts

  • #6, by afrlmeWednesday, 20. March 2019, 11:51 6 years ago
    Um, it's now possible to disable set destination on left click, & other mouse buttons.


    game.LeftClickBehaviour = eMouseActionBehaviourDoNotSendCharacter


    or...

    game.LeftClickBehaviour = 0

    Defines if the character will be sent to the current position when the middle mouse button is clicked.

    '0' (eMouseActionBehaviourDoNotSendCharacter): The character will not be send to the current position.

    '1' (eMouseActionBehaviourSendCharacterToCursor): Character will be send to current position.

    '2' (eMouseActionBehaviourSendCharacterToObjects): Character will be send to current position if it is a scene object.

    -----------

    Available behaviour tables...

    LeftClickBehaviour
    RightClickBehaviour
    MiddleClickBehaviour
    LeftHoldBehaviour

    Imperator

    7285 Posts

  • #7, by darren-beckettThursday, 21. March 2019, 08:20 6 years ago
    What is a flag?
    A boolean True/False variable, you can then check this and perform the correct tasks accordingly

    Great Poster

    384 Posts

  • #8, by MachtnixFriday, 22. March 2019, 17:14 6 years ago
    Thanks. I don't know the meaning of some terms in some special contexts.

    BTW: my solution is to switch to a particular (?) sit-down- and a stand-up-animation. It's often not easy to make it gapless from the player's position to the animation's position, but I excuse a little hopper between.

    I usually use a 3D program to render my character frames, so I render a sitting and a rising animation with chair and put it as an own animation into Visionaire.

    Thread Captain

    1097 Posts