S2ENGINE HD  1.4.6
Official manual about S2Engine HD editor and programming
Missions

In the GamePack dll there is an additional class of objects: mission.
Mission is an AI object type, to see it you must check helpers button on top of sceneViewport. Mission must be inserted into the scene, when you insert it a green box appears.

Missions can be thought of as Quests. Player is informed into inventory about the current mission to complete.
The mission description is loaded automatically by playerCharacter into the Inventory mission widget (see HUD). All missions into the scene are connected, every mission has a nextMission parameter. When a mission receives the event MISSION_COMPLETE it sets as current mission the mission specified into the nextMission parameter In order to make player knowing what is the first mission to complete there is a parameter into playerCharacter class called startMission.

Note
it is care of level designer to send MISSION_COMPLETE event to the missions when player actually completes all tasks required by the game.
This can be achieved using EventTriggers, EventSwitchers, Counters or by using a GameMachine FSM.

Mission Goals

A mission can have sub-missions called goals. A mission can contains up to 10 goals.
A goal is completed when Mission receives the messages: GOAL_COMPLETED_1, GOAL_COMPLETED_2, ... Goals description text can be set using goal_0, goal_1, goal_2, ... parameters of the Mission object, playerCharacter automatically put the description into the related inventory element (if exists, see HUD) when the current mission is the mission cotaining the goals. If you use buttons for goal description, when a goal is completed the text is lit (using WIDGET_LIT flag) for notifying the user goal completion.

Mission Design Example

There are 3 type of object you can use for doing game and mission logic:

  1. Triggers
  2. Switches
  3. Counters