Game Development Reference
In-Depth Information
Now that Kevin is alive, let's make him armed and dangerous. Go back to the Scene
button within the scene editor, and under the Layers tab click on the Background
layer to start creating actors in that layer. If you forget to do this, GameSalad will
automatically start creating actors in the last selected layer, which can be a fast way
of creating objects, but annoying if you forget.
Attacking
Pretty much any game out there nowadays has some kind of shooting or attacking in
it. Whether you're playing NHL , NFL , or Portal 2 , there is some sort of attack, or shot
that you can make, and Kevin will locate a special weapon in the first level.
The Inter Dimensional Gravity Disruptor
I created both, the weapon and the projectile that will be launched from the Inter
Dimensional Gravity Disruptor . For the gun actor, don't forget to uncheck the
Movable option in the Physics drop down to prevent the gun from moving around.
Now let's place the gun somewhere near the end of the level. For now, let's create
a new game-wide attribute, so within the scene, click on the Game button within the
Inspector window, and open the Attributes tab. Now, click on the + button to add a
new attribute. It's going to be a Boolean , and we will name it GunCollected . What
we are going to do is, when Kevin collides with the collectable gun at the end of the
level, the Boolean will switch to true to show it's been collected, then we will do
some trickery that will allow us to use multiple weapons.
 
Search WWH ::




Custom Search