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:
In
decisionMgr
ofnpcScript
onLevelLogicObj
, set the number of interactions to2
. This is required because theLevelLogicObj
object will process two interactions each frame.Create an instance of a
floatData
condition onLevelLogicObj
. Drag-and-drop this into the first condition. Make sure there is only one instance of this script on this object in the editor.Create an instance of the
condition_addScore
condition onLevelLogicObj
. Drag-and-drop this into the second condition. Set thescoreAdded
variable on the condition to2500
, and drag-and-drop thesetupLevel3
object into theinitalValue
reference to associate theinitialValue
condition component attached there into this component.Create an instance of...