Dialogue System running on paused

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
wattoo
Posts: 16
Joined: Sun Oct 05, 2014 2:40 am

Dialogue System running on paused

Post by wattoo »

Hi,



Me again, sorry. Progression continues, but I've hit another hurdle.



I need the game to pause while the dialogue system imparts its tutorial knowledge. I thought I could achieve this using the disable component thing so I disable the player's movement. Unfortunately this doesn't solve the problem because next time you play, you see your previous player static for the length of time it took for the tutorial text to play.



I need the game to effectively pause running when a conversation trigger is hit, then the dialogue be displayed, then the game to resume. Is there a way to run the dialogue system in 'real time' like this, unaffected by the game's state?



I only need this for initial tutorial level, the rest of the game is more 'normal', but the first level is proving tricky.







Cheers
User avatar
Tony Li
Posts: 20778
Joined: Thu Jul 18, 2013 1:27 pm

Dialogue System running on paused

Post by Tony Li »

Hi,



In your tutorial level, use DialogueTime to set:

DialogueTime.Mode = DialogueTime.TimeMode.Realtime;

At the end, set it back to:

DialogueTime.Mode = DialogueTime.TimeMode.Gameplay;

(This is in the PixelCrushers.DialogueSystem namespace, so add "using PixelCrushers.DialogueSystem;" to the top of your script.)



Realtime allows the Dialogue System to run conversations even if Time.timeScale==0. However, sequencer commands such as Animation() that depend on Time.timeScale won't work properly because the Animation component is paused. Animated sprites will work, though, since they're animated by the Dialogue System, not by built-in Unity components.



If this suggestion doesn't fully address your needs, please let me know what you would like the player to do during these tutorial conversations. I might be able to suggest an alternative.
Post Reply