December 2013
Beginner
320 pages
8h 22m
English
The easiest way to weaken our enemies is to give them some health that is reduced when they are shot, and to destroy them when they run out of health:
Health.3, the tank will be able to survive three hits before being destroyed.public int health = 3;
Hit. As in the case of the targets, this function is called by the BroadcastMessage function when the player shoots at it. The first line of the function reduces health by one point. The next line checks to see ...Read now
Unlock full access