Quest conversations

How to add cut scene conversations with skip options

Here is the scenario. Your player approaches a character and a conversation starts. Information about a quest is given and the player continues on his way.

You have a few options for this.

  1. Cut scene version. The player has no control over the time the speech is displayed
  2. Press a button to continue
  3. A combination of the two (speech is timed, but a button press makes it progress faster)

First thing to do is to deactivate your player when they interact with the quest giver.

In the quest giver brain.

WHEN [interacted] DO [objvar:hero][=][it]
…WHEN DO [objvar:hero][brain is active][=][false]
…WHEN DO [boolvar:conversation][=][true]

This will stop the player moving around. It also sets a boolean to start the conversation.

WHEN [boolvar:conversation] DO
…WHEN [started to] DO [numvar:speech][=][1]

This sets the conversation to start at speech 1.

Timed speech

…WHEN [numvar:speech][=][1] DO
…/…WHEN DO [Fixed camera][Fixed camera 1]
…/…WHEN [duration timer][6] DO [Say][screen center right][text:Speech number 1]
…/…/…WHEN [else] DO [numvar:speech][=][2]

you can also add a modifier to type out the speech slowly – change line to:

…/…WHEN [duration timer][6] DO [Say][screen center right][text:Speech number 1][type on speed][10]

Experiment with the duration timer to get the line length right.

You then cut and paste this block and make it:

…WHEN [numvar:speech][=][2] DO
…/…WHEN [1st person camera]
…/…WHEN [look at target][objvar:hero]
…/…WHEN [duration timer][6] DO [Say][screen center left][text:Speech number 2]
…/…/…WHEN [else] DO [numvar:speech][=][3]

Carry on with these blocks until you get to the last bit of speech

…WHEN [numvar:speech][=][5] DO
…/…WHEN [fixed camera][Fixed camera 1]

…/…WHEN [duration timer][6] DO [Say][screen center right][text:Speech number 5]
…/…/…WHEN [else] DO [numvar:speech][=][0]
…/…/…/…WHEN DO [boolvar:conversation][=][false]
…/…/…/…WHEN DO [objvar:hero][brain is active][=][true]

Conversation with interactive buttons

Add this line

…WHEN [A][pressed] DO [numvar:speech][incremented by][1]

If you leave the duration tiles and else statements in, this will act like a skip to next. If you remove the duration timers and the else statements then this will act as a continue.

You should also display the button to skip or continue.

…WHEN DO [display][icon:A][+][text:to skip][screen bottom center][x-large font]

Also add (the number being one more than the last speech)

…WHEN [numvar:speech][=][6] DO [numvar:speech][=][0]
…/…WHEN DO [boolvar:conversation][=][false]
…/…WHEN DO [objvar:hero][brain is active][=][true]

Comments are closed.

Powered by WordPress.com.

Up ↑

%d bloggers like this: