Game Development Reference
In-Depth Information
Doing so should automatically add an image point. Note that Imagepoint has a different
icon than Origin . The image point is not the origin; it is simply a place where we can
point to on the sprite. Place the image point outside where you want the green ball to
spawn. This is really handy because this would be much harder to do in other environ-
ments. Your image box should look something like the following screenshot:
Now, we are almost ready. Let's go back to our event sheet and find BallGreen and find
Find path to action. Select it and press Ctrl + C to copy the action. Find the BallGreen
object's On created event and paste the action. In this case, the order does not matter.
Generally, the order of actions does matter; if you are making a game and you find that
your game doesn't work properly, go through the action logic and see whether it makes
sense. The following screenshots show what it looks like before and after:
We are almost finished. What we need to do next is add two Compare variable events.
Let's compare whether isWave is to equal to 1 and ballCount is equal to 0 . The next thing
we have to do is add an action. This action will set the value of isWave to 0 . The way this
works is that once all of the balls have been spawned, we need to turn off the spawner. We
do this by setting isWave back to 0 .
Your event sheet should look like the following screenshot:
Search WWH ::




Custom Search