Condition Observer

Component > Dialogue System > Trigger > Condition Observer

Condition Observer checks for a condition on a regular frequency, and runs an action when the condition is true.

Properties

Property Function
Frequency The frequency in seconds between checks
Only Once When the condition is true, run the action and then destroy this component
Observe GameObject The GameObject to reference when evaluating the Condition (optional)
Condition The Trigger Conditions required for the action to run
Action The action(s) to take when the condition is true

The actions include:

Property Function
Lua Code The Lua code to run (blank for none)
Quest Name & Quest State The quest to update and its new state (blank for none)
Sequence An optional cutscene sequence to play
Alert Message An optional gameplay alert message to show
Localized Text Table Optional localized text table for Alert Message
Send Messages Target GameObjects and messages to send to them (e.g., send "OnUse" to a GameObject with a Sequence Trigger)

Details

This component evaluates the condition every Frequency seconds. Checking quest states, and especially arbitrary Lua code, may be time-consuming. Use the largest interval that works for your gameplay needs, and keep the Lua condition to a minimum.

The Only Once checkbox only works during the current scene. If you want this functionality to persist between level changes or saved games, include it in the condition instead.

This component updates the quest tracker if you've configured one.


<< Components