Mission Objectives

Mission scripts can be found from 00ViD/Scripts/Systems/Missions/Basic.

The core of the mission system are objectives. Objectives need a hierarchy parent with an Assignment-component that activates the objectives. In Assignment-compnent you can also set up the objective tiers, order and optionality.

The objective-component has multiple important features that we go through below.

Objective-component

Objectives 1

From top to bottom:

  • This Name - Title of the objective. This is few word description of the objective. Main use in-game is to show this to player through the component "MissionsInfoPanel.cs". The example shown here has the start term "TEXTGET" which links the title to our localization system.

  • Description - Description of the objective. Longer description of the objective. This can also be shown to player through the component "MissionsInfoPanel.cs".

  • Guide - Tutorial guide for the objective. This can also be shown to player through the component "MissionsInfoPanel.cs".

All of the above are optional, but are recommended to use even if you do not show them to the player, because they will tell other developers what the objective's purpose is; at least use the "This Name" title.

  • Mission Events - Mission Events are custom scripts that are called on MissionStates. These include, for example, MissionsSounds. If this array is empty, it will attempt to get all MissionEvents on this object on Awake.

  • Objective State - This shows the current state of the objective. Don't change this! It works automatically through Assignment.cs or through manually called public functions.

  • Complete Conditions - These text-strings are how the objectives get completed. Usually just one string that is named logically, but could be many for specific cases.
    Simply call the specific text string of an objective via ConditionTrigger-components(or implement your own method) when that specific objective is active.
    Next page has in-depth description of the different completion methods.

Objective Critical Objects

Objectives 2

  • Type - When you create a Critical Object, you need to select a type from the following:

  • ---New Object - Instance and control an object from item pool. Gives you placement options when selected.

  • ---In Scene Object - Control an object in current scene. Takes any game object in the scene.

  • ---Findable Object - Find an object via FindableObject-component and control it. Gives you options when selected.

  • ---Game Object Find - Find an object via game object's name and control it. Not recommended because searching objects via name is a relatively slow process. Gives you options when selected.

State Actions List

Objectives 3 State Actions can be thought of as a simple visual scripting tool, although our programmer wouldn't call it that. Through State Actions you can modify and control game objects without scripting when objective states change.

  • On State Actions-list - List of actions you can perform on the selected game object. This list can be easily expanded via scripting if needed.
    Notice that not all of the actions can be performed to just any game object. For example to enable/disable Grabbable or Outline components, the selected object needs to have those components.

Most of the actions are self-explanatory, but here's quick overview:

  • ---Animator - Control animator parameters on selected game object.

  • ---Canvas - Enable/Disable canvas component on selected game object.

  • ---Collider - Control single collider or all colliders on selected game object, or all colliders plus all colliders in children.

  • ---Findable - Add, remove or change findable component on selected game object.

  • ---Game Object - Most commonly used actions: Enable/Disable/Destroy selected game object.

  • ---Grabbable - Enable/Disable VDGrabbable-component on selected game object.

  • ---Mesh Renderer - Enable/Disable mesh renderer-component on selected game object.

  • ---Outline - Enable/Disable outline-component on selected game object. Logically the selected game object needs the Outline.cs to begin with. Same with all of specific component-actions.

  • ---Position Resetable - Reset or save transform of the selected game object. Needs to have the component PositionResetable.cs.

  • ---Rigidbody - Control Rigidbody on selected game object.