Reader small image

You're reading from  Creating E-Learning Games with Unity

Product typeBook
Published inMar 2014
Reading LevelIntermediate
Publisher
ISBN-139781849693424
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
David Horachek
David Horachek
author image
David Horachek

David Horachek is a video game software developer with over 13 years of experience in programming arcade, home console, and portable games. He has programmed game projects published by Midway Games, EA, Ubisoft, SEGA, and others. He develops games under the Arbelos Interactive label.
Read more about David Horachek

Right arrow

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.

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Creating E-Learning Games with Unity
Published in: Mar 2014Publisher: ISBN-13: 9781849693424

Author (1)

author image
David Horachek

David Horachek is a video game software developer with over 13 years of experience in programming arcade, home console, and portable games. He has programmed game projects published by Midway Games, EA, Ubisoft, SEGA, and others. He develops games under the Arbelos Interactive label.
Read more about David Horachek