Conditions

Conditions help control the flow of a story. Conditions and events are the primary ways to control the timing of actions and transitions.

You can think of a condition as a type of gateway, preventing or allowing something to proceed. When your story comes to an action or transition, any condition you have set must be "true" for the action or transition to run. Otherwise it will be ignored.

You can set a condition by clicking on the Add a Condition button in the Properties window of an action or transition. There are several types of conditions listed below.

Condition Types

By default, Condition Type is set to "none." When you click on the Type pull-down menu and choose a condition type, its parameters appear below the menu.

Condition Types

The following list describes the types of conditions you can set and their values.

After Time Range

This condition is true after the specified time range.

  • Time: Enter the amount of time.
  • Mode: "Total" time counts from the beginning of a state until it exits. "Local" time resets at the beginning of each state loop.

Are States Cached

  • State Names: List the names of the states for which you want to check cache status.

Before Time Range

This condition is true before the specified time range.

  • Time: Enter the amount of time.
  • Mode: "Total" time counts from the beginning of a state until it exits. "Local" time resets at the beginning of each state loop.

Compare Global or Local Variable

These conditions test the current value of a global or local variable that you previously created.

Remember that, if the variable is local, it can be used only for the Story Graph in which it was created. Global variables can be used across Story Graphs.

  • Variable Name: Enter the name of the variable to be tested.
  • Operator: Choose an operator for the test. Defined and Undefined test whether the variable was previously created, or whether the Undefine action has removed it.
  • Value: Enter a value to test against. You do not need to enter a value for the Defined or Undefined operators.

Controller Button Down

A controller is ordinarily a hand-held device used while viewing a story, often in a VR environment. The Controller Button Down condition tests whether a specified button on that controller is being pressed.

By default, this condition is true if the button is down at the time the condition is tested, regardless of when the button was actually pressed. However, if you use the Immediate attribute, this condition will be true only if the button is pressed on the same frame that the condition is tested, and not before. If the Immediate attribute is checked, and the button is pressed before the current frame, the condition is false even though the button may be down.

  • Controller: Specify a controller to test against. The list of names will be populated with the controller types found on your system. Choose ANY to test against all available controllers.
  • Button: Specify a button from the controller to test against. To test multiple buttons, use multiple conditions.
  • Immediate: When checked, the condition is true only if the button is pressed down on the current frame.

Controller Button Up

A controller is ordinarily a hand-held device used while viewing a story, often in a VR environment. The Controller Button Up condition tests whether a specified button on that controller is released (not being pressed).

By default, this condition is true if the button is up at the time the condition is tested, regardless of when the button was actually released. However, if you use the Immediate attribute, this condition will be true only if the button is released on the same frame that the condition is tested, and not before. If the Immediate attribute is checked, and the button is released before the current frame, the condition is false even though the button may be up.

  • Controller: Specify a controller to test against. The list of names will be populated with the controller types found on your system. Choose ANY to test against all available controllers.
  • Button: Specify a button from the controller to test against. To test multiple buttons, use multiple conditions.
  • Immediate: When checked, the condition is true only if the button is released on the current frame.

Device Display Type

This condition is true if the current device matches the setting specified.

  • Mode: Choose "Mono" for single display devices. Choose "Stereo" for Google Cardboard and VR devices.

Head Height

Some VR experiences, especially with 6-degrees of freedom, are best experienced at a certain height range in the world you create. And you may not know if your viewer is sitting or standing. This condition is true if the viewing device is currently in the range you specify. The height is measured in world units above zero (often the ground plane) in your scene.

  • Min Height: The minimum height of the viewing device.
  • Max Height: The maximum height of the viewing device.

Install Progress

Install Status

Is Story Launched from Deep Link

Network Status

Render to Disk Mode

This condition is true if the Enable Render to Disk checkbox was checked in the Build and Play window.

  • Rendertodiskstr: This string is currently a placeholder.

Trigger Status

This condition is true if the viewer's camera is pointing at the specified trigger.

  • Trigger: Enter the name of the trigger.
  • Delay Operator and Delay: Set a threshold for the Trigger status to be true before or after a specified number of seconds.
  • Returns: Default is "True." Change to "False" if you want the condition to be false when the camera is pointing at the trigger. This can be useful if you want something to happen, such as a scenery change, when the camera is pointing away from a location.

User Is Seated

Use this condition to test the position of the viewer in a VR environment, which often just determines if the viewer is standing or seated. You can also test against the roll, pitch, and yaw of the device to make sure it is in the position you expect.

  • Min, Max Height: Enter the values, in scene units, of the minimum and maximum height of the device.
  • Max Roll, Pitch, Yaw: Enter the maximum value for roll, pitch, and yaw that you still want to result in a "true" condition.

Within Loop Range

This condition is true if the current loop number of the state is within the specified range.

  • Min Loop: Enter the minimum number of loops a state must run before the condition is true.
  • Max Loop: Enter the maximum number of loops a state can run and still have the condition be true.

Within Time Range

This condition is true if the current run time of the state is within the specified range.

  • Start Time: Enter the minimum story time before the condition is true.
  • End Time: Enter the maximum story time that can run and have the condition be true.
  • Mode: "Total" time counts from the beginning of a state until it exits. "Local" time resets at the beginning of each state loop.