Component > Pixel Crushers > Dialogue System > Trigger > Condition Observer
Condition Observer checks for a condition on a regular frequency, and runs an action when the condition is true.
Property | Function |
---|---|
Frequency | The frequency in seconds between checks. |
Once | When the condition is true, run the action once (for this instance of the scene) and then destroy this component. |
Observe GameObject | The GameObject to reference when evaluating the Condition (optional). |
Condition | The 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. |
Text Table | Optional text table for Alert Message. |
Send Messages | Target GameObjects and messages to send to them (e.g., send OnUse to a GameObject with a Dialogue System Trigger). |
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 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.