O'Reilly logo

Creating E-Learning Games with Unity by David Horachek

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Modifying the LevelLogicObj object

The LevelLogicObj object will track the condition when the player has achieved a high score that is enough to earn the level finished pop up and to win the game. To implement this with the technology we already have, we will perform the following steps:

  1. In decisionMgr of npcScript on LevelLogicObj, set the number of interactions to 2. This is required because the LevelLogicObj object will process two interactions each frame.
  2. Create an instance of a floatData condition on LevelLogicObj. Drag-and-drop this into the first condition. Make sure there is only one instance of this script on this object in the editor.
  3. Create an instance of the condition_addScore condition on LevelLogicObj. Drag-and-drop this into the second ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required