Missions

Missions are objects that incorporate information about the objectives Player has to pursue.
When you want to create a new mission you can create it as any other object (see Object Creation) and set the mission main parameters.
 
The mission main parameters are shown below:
6.3.5. Missions
1

Title

1. Title
<TODO>: Insert description text here...
2

Description

2. Description
<TODO>: Insert description text here...
3

Goal_0....9

3. Goal_0....9
<TODO>: Insert description text here...
4

NextMission

4. NextMission
<TODO>: Insert description text here...
5

ObjectsToAwake

5. ObjectsToAwake
<TODO>: Insert description text here...
6

NumberOfGoals

6. NumberOfGoals
<TODO>: Insert description text here...
7

Duration

7. Duration
<TODO>: Insert description text here...
8

MIssionReport

8. MIssionReport
<TODO>: Insert description text here...
9

ObjectsToAwakePerGoal_0...9

9. ObjectsToAwakePerGoal_0...9
<TODO>: Insert description text here...
10

GameStateFile

10. GameStateFile
<TODO>: Insert description text here...
11

CheckpointFile

11. CheckpointFile
<TODO>: Insert description text here...
12

Receivers

12. Receivers
<TODO>: Insert description text here...
13

event

13. event
<TODO>: Insert description text here...
14

delay

14. delay
<TODO>: Insert description text here...
15

report_sound

15. report_sound
<TODO>: Insert description text here...
16

ScoreObject

16. ScoreObject
<TODO>: Insert description text here...
 
When a mission is triggered its description is stored into the inventory.
 
There are 2 ways in which the mission is stored into the inventory depending on the game design:
  • If the game is designed to have more than one missions opened at time then the inventory list of missions must be used.
  • If the game is designed to have only one mission at time then the inventory single mission description can be used.
     
     

SINGLE MISSION DESCRIPTION
 
When the game requires that Player must complete only one missions at time there are following UI elements you can set
Just as the majority part of ithe UI, even these elements are managed by the Player, so their name must remain unchanged because are necessary to make them to be recognizable by Player.
6.3.5. Missions
1

mission_title

1. mission_title
<TODO>: Insert description text here...
2

mission

2. mission
<TODO>: Insert description text here...
3

Goal_0...9

3. Goal_0...9
<TODO>: Insert description text here...
 
If you use these elements to store current mission description you can delete (if exists) all the widgets hierarchy related to the missions list page.
This is what has been done in the FPS Template and in the Walking simulator template.
 
 

MULTIPLE MISSIONS DESCRIPTION
 
 

HOW MISSIONS WORK?
 

OPENING A NEW MISSION

Before being completed, a mission must be "opened", in other words it must be set as (one of) the current mission(s) to complete.
When a mission is opened it is added to the list of missions to complete, so there could be more than one mission to complete at the same time or a mission could be completed only if a number of other missions are completed.
All depends by the design you choose for your game.
When a mission is completed it is removed from the list.
 
There are 3 kind of objects that can "open" a mission (or a list of missions):
 

The Player Character

The player character has the possibility to open the starting mission. You have to simply set the start Mission parameter.
 

Another Mission

When a mission is completed it can "open" the next mission to complete. To do this you must set the nextMission parameter.
You can also create a void mission just for opening a new mission at a given moment. In fact you can complete the void mission when you want to open a new mission.
 
The mission counter is probably the most important object to create a structured mission system. This object has a list of missions and a counter set with the number of missions.
When a mission is completed the counter is decremented, when the counter reaches zero a new mission (or a list of new missions) is opened.
In this way only if the player completes all the missions in the counter list he can proceed with a new set of missions.
 

COMPLETING A MISSION

To be completed (and open the nextMission, or, in case of MissionCounter, to inform the counter that it has been completed) a mission must receive the MISSION_COMPLETED message.
This mesage can be sent in one of the usual ways:
 
And in general using every object is capable of sending messages.
 
 

MISSION GOALS
 
A mission can contain a list of sub missions we call "Goals".
A goal is an additional text showed in the inventory mission description that is grayed when the goal is completed (see missions page).
There must be a maximum of 9 goals per mission.
 
Generally you can use goals for creating a list of items to collect.
 
For example you could create a mission for collecting all photos in a house adding to that mission a list of goals, one for every photo found, called "photo #1", "photo #2", "photo #3" and so on. When player found a photo the related goal is completed and the related text is grayed (so user knows he has found the right photo).
 
To complete a goal a GOAL_COMPLETED_0...9 message must be sent to the mission. When the mission receives this message the related goal text is grayed.
Completing all goals of a mission does not automatically complete the overall mission. It is responsibility of developer to send the MISSION_COMPLETED message to the mission once all goals have been completed.
Generally it is obtained by using a Counter that counts all items to be collected related to each goal, when all itemTAG has been picked-up the counter sends the MISSION_COMPLETED message to the mission.
In this case each itemTAG itself can send to GOAL_COMPLETED_x message to the mission when it is picked-up.