Completely disable all player movement for specific scenes

  • #1, by pakeithpsyWednesday, 06. April, 23:10 A month ago
    I'm trying to create a scene where the player character is not visible and therefore cannot move anywhere on screen. However, everything else on screen can still be moved and interacted with. Yet I cannot find a way to disable movement for the player character. Setting it to "hide character" only makes the character invisible, but when I removed the "hide" command, I found out the character is still moving to where I click. Nothing I do can stop this, not even removing the way system does anything as they just continue to walk around. How can I disable movement for the player character???

    Newbie

    12 Posts


  • #2, by afrlmeThursday, 07. April, 00:00 A month ago
    Don't add the character to the scene - use show scene/menu action part instead of change scene action part to change to a new scene without teleporting the playable character to it. Or create a way system border outside of the scene & set the character position inside of that. Or you can disable destination update for each mouse input via script too. Or use a menu type scene or an interface overlay. You have loads of options to choose from. wink

    Imperator

    7122 Posts

  • #3, by pakeithpsyThursday, 07. April, 01:30 A month ago
    Well... that fixed the problem, but now I can't see any subtitles for the player character.

    Tried creating a new character for that purpose but I can't get the subtitles in the spot I want them.

    Edit: Nvm I found out how to use narration text, I'm good. ??

    Newbie

    12 Posts

  • #4, by afrlmeThursday, 07. April, 02:08 A month ago
    Aye narration text is the way to go when you have no character(s) on scene.

    Imperator

    7122 Posts

  • #5, by pakeithpsySunday, 01. May, 03:32 A month ago
    Okay, now I'm on a new scene where the player character is visible, but shouldn't be able to move since they're supposed to be trapped at this point in the story. Still can't get them to stay put, even with no way system.

    Tried creating an action area with the action "stop character" and execution type "when character enters area" but that doesn't seem to be doing anything.

    Newbie

    12 Posts

  • #6, by afrlmeSunday, 01. May, 18:05 A month ago
    Did you change the title of this thread?

    Anyway... you have at least 2 choices.

    1. swap out the playable character with an npc version.

    2. you can use Lua script to temporarily tell the engine that left click shouldn't update the destination.

    game.LeftClickBehaviour = eMouseActionBehaviourDoNotSendCharacter


    Here are all the available options you can use:

    • eMouseActionBehaviourDoNotSendCharacter 0
    • eMouseActionBehaviourSendCharacterToCursor 1
    • eMouseActionBehaviourSendCharacterToObjects 2


    The default option is: eMouseActionBehaviourSendCharacterToCursor

    Imperator

    7122 Posts

  • #7, by pakeithpsySunday, 01. May, 19:03 A month ago
    Ah. I did try the NPC method you mentioned, it seems to work alright.
    Not well-versed in Lua, though I may give it a try.

    Newbie

    12 Posts

  • #8, by afrlmeSunday, 01. May, 19:32 A month ago
    Insert this line of code into an execute script action part when you want to disable left click from updating destination...

    game.LeftClickBehaviour = eMouseActionBehaviourDoNotSendCharacter

    & same thing again when you want to re-enable it via this line of code...
    game.LeftClickBehaviour = eMouseActionBehaviourSendCharacterToCursor

    & that's about it. wink

    Imperator

    7122 Posts

  • #9, by pakeithpsySunday, 01. May, 20:33 A month ago
    Worked like a charm!
    Thanks man.

    Newbie

    12 Posts

Write post