Game Development Reference
In-Depth Information
We want the projectile to collide with the green ball, so select BallGreen as the object, as
shown in the following screenshot:
After all of this, your event sheet should look like the following screenshot:
One thing that you will notice is that the turrets keep on firing. We want them to fire only
when the wave of green balls is advancing. This is actually pretty easy to fix. Go to your
event sheet and right-click on it, and then select Add global variable from the contextual
menu as shown in the following screenshot:
The New global variable window will appear; enter something appropriate for your glob-
al variable name (see the following screenshot). For the purpose of this example, we will
call the variable isWave . At the time of writing, there are no global Boolean variables.
So, we are going to add a number variable. In this case, 0 will be false and 1 will be true;
so when the isWave is set to 1 , the wave of green balls will spawn.
Search WWH ::




Custom Search