Freeze player position during dialogues

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
FunD
Posts: 27
Joined: Tue Feb 12, 2019 6:14 am

Freeze player position during dialogues

Post by FunD »

Hi,

I have a question:

I want to freeze the player's position while the dialogue system is running and only be able to move again once the player went through the whole dialogue. However, if possible, I'd like the player to still have the option to look around (just can't walk).
I haven't been able to figure out how to do that with pixel crusher dialogue system. Would you know?

Also, another thing quickly, I just noticed that when the player presses spacebar it also goes to the next dialogue box. I actually just want the player to press 'Enter' for that. I searched the Dialogue Manager Settings in the Inspector, and can't find where it's set to 'Enter' and 'Spacebar' for going from one dialogue box to another. Where can that be changed ?

Thank you very much for your time, I really appreciate it
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Freeze player position during dialogues

Post by Tony Li »

Hi,
FunD wrote: Mon Feb 25, 2019 1:31 pmI want to freeze the player's position while the dialogue system is running and only be able to move again once the player went through the whole dialogue. However, if possible, I'd like the player to still have the option to look around (just can't walk).
I haven't been able to figure out how to do that with pixel crusher dialogue system. Would you know?
Add a Dialogue System Events component to the player. Configure the OnConversationStart() event to disable whatever components allow the player to move. Don't add the components that allow the player to look around. Configure OnConversationEnd() to re-enable the components.

See the second half of the Interaction Tutorial for an example.
FunD wrote: Mon Feb 25, 2019 1:31 pmAlso, another thing quickly, I just noticed that when the player presses spacebar it also goes to the next dialogue box. I actually just want the player to press 'Enter' for that. I searched the Dialogue Manager Settings in the Inspector, and can't find where it's set to 'Enter' and 'Spacebar' for going from one dialogue box to another. Where can that be changed ?
It could be a couple of different things.

1. If you're using a continue button, then if the Dialogue Manager's Input Device Manager > Input Mode is set to Joystick or Keyboard, or if the Always Auto Focus checkbox is ticked, it will auto-focus the continue button. In this case the "Submit" input will click the continue button. By default, "Submit" is mapped to 'return' (enter) and 'space'. To remove 'space' from the mapping, select Edit > Project Settings > Input.

2. Also check the continue button for a UIButtonKeyTrigger component. If it has this component, make sure it isn't mapped to the spacebar key, or remove the component entirely.

3. If you're not using a continue button, it's possible that 'space' is mapped to the Dialogue Manager's Input Settings > Cancel Subtitle Input. You can set this to None to unmap the spacebar.
FunD
Posts: 27
Joined: Tue Feb 12, 2019 6:14 am

Re: Freeze player position during dialogues

Post by FunD »

Great!

This solved both my issues. Thank you so much! This forum is absolutely great :)
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Freeze player position during dialogues

Post by Tony Li »

Happy to help! :-)
Post Reply