Game Development Reference
In-Depth Information
With these attributes, we are going to detect how many enemies were killed, how
many coins were collected, and if the other objectives were completed, we are going
to add to the score according to the success of the objectives in the level.
First, we need to detect how many coins have been collected and enemies killed.
Now let's focus on the number of coins collected.
Go into our Kevin actor, and in the Coin rule, add a new Change Attribute
behavior, and change it to Change Attribute: | game.Coins Collected | to | game.
Coins Collected +1 . Now each time a coin is collected, it will add one point to the
attribute to be used at the end of the level. Now, for the enemies being killed, we will
have to go into each of our bad guy actors, and under the rule where we detect zero
health (I called my rules Bye Bye Die ), do the same as with coins collected. Just add
one instead to the Enemies Killed attribute:
 
Search WWH ::




Custom Search