Game Development Reference
In-Depth Information
Now we will create a new level just after our first level; in this level, the game will
tally the score. Simply drag the text actors accordingly; one side for the labels (or
objective description), and the second set displaying the corresponding information.
For each coin collected and enemy killed, I'll add 10 points to the score, and for
collecting the gun and shields, I'll add 100 points each.
Now let's add one last label in the center at the bottom that will tally up the score.
This one will involve a slightly complex equation, but nothing difficult. First we are
going to display the text.
We will need four different rules to detect each outcome:
First, if the player collected the gun, but didn't collect the shields
Second, if the player collected the shields but not the gun
Third, if the player collected both
Lastly, if the player collected neither
We will start with the rule where the player collected both the gun and shields.
So create a new rule; it will have two conditions, which will be the following:
First, Attribute: | game.Gun Collected | is | true
The second condition will be Attribute: | game.Shields | > | 0
I did this because I didn't create a Boolean to detect whether they were collected
or not.
 
Search WWH ::




Custom Search