Completing an Objective

Complete Condition scripts can be found from 00ViD/Scripts/Systems/Missions/Basic/ConditionTriggers.

Complete Conditions 0 Objectives are give a specific text-strings called "Complete Conditions". They are how the objectives get completed.
Usually just one unique string, that is named logically, is used, but it could be multiple and non unique for specific cases.
Simply call the specific complete condition text string via ConditionTrigger-components(or implement your own method). If the specific objective that corresponds to the complete condition string is active, it gets completed and next objective is activated.

Condition Triggers

Complete Conditions 1

These components can be used to complete objectives. If you need a custom way, you can easily create a new script based on these examples.
All condition triggers work similarly to each other, but in specific situations that we go through below.

They all have Condition Tag-string field where you need to specify the same(case sensitive) complete condition string that you set in the objective.
Condition Int is another way of specifying which objective to complete, but it's easier to mess up and harder to track, so we recommend using the string-tag and naming them logically.

Simplest Condition Trigger is the ManualTrigger, which has nothing else but an editor button.
All the other Condition Triggers have more options to set.

Complete Conditions 2 Complete Conditions 3

  • ConditionTrigger_Base - Inherited script, not usable by itself. You can inherit this in your script to implement custom condition triggers.

Complete Conditions 4

  • ConditionTrigger_Float - Right off the bat a bit more niche use case: This is a way to complete an objective when a certain float-value is reached. Which float value is up to you: For example when the score hits a certain value. You can use a custom script to pass a float to this condition trigger or for example UnityEvent_VDEvent to do it. Example image:

  • ConditionTrigger_Interact_BNG - Complete objectives by VR interactions like when grabbing an object, or on trigger click. Requires trigger collider.

  • ConditionTrigger_ItemInCollision - Complete objectives by collision. For example player throws an object and that object hits a target. Requires a collider and at least one of the colliding objects needs to have a rigidbody-component.

  • ConditionTrigger_ItemInTrigger - Complete objectives by trigger collision. For example player moves into a trigger collider. Requires a trigger collider and at least one of the colliding objects needs to have a rigidbody-component.

  • ConditionTrigger_ManualTrigger - Condition Trigger that can be completed by an editor button for testing purposes. Can also be used via unity events public function.

  • ConditionTrigger_ParticleCollision - Complete objectives by particle collision. For example player activates a particle water flow and the particles hit a collider. Requires a collider with rigidbody and the particle system needs to have collision AND "Send collision messages"-booleans enabled.

  • ConditionTrigger_SnapInPlace - Complete objectives by snapping interactable items. For example player grabs an object and snaps it in place. Requires a trigger collider and SnapItemInPlace-components. Grabbable item needs of course rigidbody and a collider-components.

  • ConditionTrigger_Timer - Complete objectives by timer. If timer is not set to 'start on enable', you need to start the timer from public function, for example via objective unity event.