How to Add Quick Time Events (QTEs)

Quick Time Events (QTEs) are an entirely optional feature in the Dialogue System. At author-specified times, the Dialogue System can display a QTE Indicator, which is a prompt for the player to choose to hit a trigger button before the indicator disappears. If the player triggers the QTE, typically something context-specific happens.

The built-in dialogue UI prefabs define two QTE indicators: "QTE 0 Good" and "QTE 1 Evil". If you want to give the player the option of performing an "evil" action (typically during a conversation), you can display "QTE 1 Evil" for a short time. Then your conversation can check if the player triggered the QTE and act accordingly.

How To Add QTEs

  1. In the Dialogue Manager's Display Settings, define the QTE input buttons. By default, QTE 0 is assigned the button "Fire1" and QTE 1 is assigned the button "Fire2". You can define new buttons by selecting Edit > Project Settings > Input.
  2. Define QTE indicators in your dialogue UI. The built-in dialogue UI prefabs already define two indicators (good and evil). If you only want to change the appearance of the indicators, you can assign new textures to them. (More info: How to Set Up the Dialogue UI)
  3. Use the QTE() command in a sequence.
    • Syntax: QTE(index, duration, luaVariable, luaValue)
    • Description: This shows a QTE indicator for the specified duration. If the player triggers the QTE, a Lua variable is set to a specified value; otherwise it's set to a blank string.
    • Example: QTE(0, 2, Punch_NPC, yes) (Presents a two-second QTE opportunity for the player to punch the NPC. If the player inputs the QTE trigger in time, the Lua variable Variable["Punch_NPC"] will be set to "Yes".
  4. If this is in a conversation:
    • Link the QTE dialogue entry node to an empty child dialogue entry node whose Sequence is set to None(). This is required. (For an explanation, see Conversations Evaluate Conditions One Extra Level Ahead.)
    • Link the empty child node to one or more nodes that check the value of the variable that the QTE() sequencer command set. For example, using the example above, check Variable["Punch_NPC"]. If it's set, the linked dialogue entry can play a sequence that plays a punch animation.

The conversation "Private Hart" in the Feature Demo contains a QTE example.


<< How to Add Lipsync | How to Customize the Sequencer >>