Similar to games like Goldeneye and Perfect Dark, Orchid Rain levels have a set of objectives that need to be completed before the level ends. There are different types of objectives you can add to your maps. Every map should have at least one Mission Objective to be beatable.
Almost all Mission Objective components have the same propierties.
Objective Number
Every objective will have an identifier number which will also determine the order they are showed in the Mission menu
All objectives need to be sequential numbers, meaning that you cannot set one objective to be Objective Number 3, when there's only other Mission Objective that is set to 1. If you this, the game will not function properly. Keep track of your Mission Objectives!
Objective Name
This determines the text that will be shown in the Mission menu to describe the Mission Objective
Needs Another Mission
In case you want an Objective that requires another Objective to be completed before that one can be considered completed, check this option
Mission Needed
If you checked the previous option, you will need to define what's the required Objective here
Fail If Requirement Not Met
When checked, this mission objective will fail if the player triggers it without having completed the Mission Needed.
When unchecked, this mission objective will be queued, and it will trigger right after its Mission Needed is completed.
This property is ignored if there is no Mission Needed.
You can establish if completing all Mission Objectives will end your level automatically in the [LevelManager]. Also, if failing one Mission Objective will end the level can be marked here as well.
To create an objective, you have to use one of the Mission Objective components.
Completed when the player collects a specific pick up. Add the component MissionObjective_Collect to a pickup spawner, which are HealthSpawner, ItemSpawner and WeaponSpawner.
Completed when the player destroys an object.
Completed when the player enters a defined area. Add the component MissionObjective_GoHere to a GameObject that contains any Collider with its trigger setting enabled. Check the example given below for more details. Set the Layer to MissionTrigger.
Completed when a specific NPC dies. Add the component MissionObjective_KillNpc to any NpcSpawner. The first NPC that is spawned from that NpcSpawner will be the only one that has that MissionObjective attached to it.
Adding a Mission Needed value will make it necessary to complete another mission objective. If the player kills this NPC without completing its requirement, the objective will fail.
This objective is never completed, but it fails when the target NPC is killed. Add the component MissionObjective_ProtectNpc to an NpcSpawner. Works in the same way as MissionObjective_KillNpc.
Completed when the player uses an interactable object, like a button. Add the component MissionObjective_Use to any GameObject with any type of Collider attached to it.
Completed when the player uses an item on an object. Add the component MissionObjective_UseItem to any GameObject with any type of Collider attached to it. Set the Layer of this GameObject to WorldColliders. Set the property Trigger Item to the desired item.
Create an empty GameObject and add any Collider component to it, except all the 2D colliders, since this is a 3D game. A box collider is one of the most performant Colliders, so I'll choose that one.
Add a MissionObjective_GoHere component as well. Since I already have another Mission Objective for the NpcSpawner, I'll need to set the Objective Number to 2. Be sure to mark the Is Trigger option of your Collider too. A Unity Trigger is a Collider that doesn't block objects passing through. It's useful for detecting objects that go inside it. I used the Scale (Hotkey R) tool to give it the shape you see. You will also need to set the Layer on this GameObject to "18: MissionTrigger".
If everything is setup correctly, you should have a beatable level by now.
Note: your level needs to be beatable in order for Tech Points and Rescued Enemies to be saved. These will only save when a level is completed.