Game Development Reference
In-Depth Information
Adding a mission to the missionMgr
script
Recall the missionMgr script attached to the GameObject (a child of _global ). This
is the class that manages tracking objectives in the game. In order to create a new
mission for level two, let's perform the following steps:
1. Select the missionMgr script, and set the size of the mission's component to
1 , telling the system we will have one mission in this level.
2. Set the mission to activated , visible , and MS_ACQUIRED so that the level
starting with this mission is ready to be processed from the start.
3. Set the display name to win the race and the description to achieve 100%
accuracy and first place in the race .
4. Set the token component size to 0 . Another script will fill these dynamically,
but eventually it will be filled with the randomly chosen flags from Chapter 1 ,
Introduction to E-Learning and the Three Cs of 3D Games .
5. Set the points to 2500 and the reward object to null .
This is a sufficient setup for the mission on initialization.
Search WWH ::




Custom Search