Reader small image

You're reading from  Gamesalad Essentials

Product typeBook
Published inJan 2015
Publisher
ISBN-139781784391973
Edition1st Edition
Concepts
Right arrow
Author (1)
Miguel DeQuadros
Miguel DeQuadros
author image
Miguel DeQuadros

Miguel DeQuadros is a game developer and the founder of the independent development studio, Wurd Industries, based in Ontario, Canada. He has been developing iPhone games since the release of the App Store back at the exciting release of iOS 2.0. Since then, he has released 10 games and 1 entertainment app world-wide on the App Store with more to come from Wurd Industries. He was originally interested in 3D animation and graphical design, which he focused on mainly in 2004. But, he then got the game development bug and has been developing iPhone apps since 2008, which also allows him to use his creativity and knowledge of 3D animation for cut scenes and videos within his apps, and he is loving every minute of it. Starting from his first project, Toy Tennis, back in 2008, down to his current project, SpaceRoads, for PC, Mac, Wii U, and other platforms, he continues to develop high-quality apps and games alike. Moving away from simple game development tools, he now primarily uses Unity3D, 3D Studio Max, and the Unreal Engine for his current project in an aim to create very high-quality games. His games can be seen on the App Store on iOS, Steam Greenlight, Amazon, and IndieCity, and of course on his website, www.wurdindustries.com. His games have been reviewed on YouTube by Action Soup Studios, and you can also find his interviews there.
Read more about Miguel DeQuadros

Right arrow

Ammo


While we could let Kevin have an unlimited amount of ammo, what kind of challenge would that be? Ammo is another easy thing to program into GameSalad. We will start by creating a game-wide attribute, which will be an Integer, and we will call it Ammo, change the Value to 500. Alternatively, you could set it to a low number such as 7, and create another attribute for the amount of clips; then once you run out of ammo, decrease the number of clips and reload the ammo. However you want to do it, I'm going to show you how to do it! In our Kevin actor, create a new rule, change it to Attribute | game.GunCollected | is | true, and then drag in a Display Text behavior. For the text click on the e button to open up the expression editor and select game.Ammo, and set the Y position to 40, and the Size to 10. Once you collect the gun, it will display the ammo value above Kevin's head. Handy!

To count ammo that is being depleted, go into our Inter-Dimensional Gravity Distributor actor. That didn...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Gamesalad Essentials
Published in: Jan 2015Publisher: ISBN-13: 9781784391973

Author (1)

author image
Miguel DeQuadros

Miguel DeQuadros is a game developer and the founder of the independent development studio, Wurd Industries, based in Ontario, Canada. He has been developing iPhone games since the release of the App Store back at the exciting release of iOS 2.0. Since then, he has released 10 games and 1 entertainment app world-wide on the App Store with more to come from Wurd Industries. He was originally interested in 3D animation and graphical design, which he focused on mainly in 2004. But, he then got the game development bug and has been developing iPhone apps since 2008, which also allows him to use his creativity and knowledge of 3D animation for cut scenes and videos within his apps, and he is loving every minute of it. Starting from his first project, Toy Tennis, back in 2008, down to his current project, SpaceRoads, for PC, Mac, Wii U, and other platforms, he continues to develop high-quality apps and games alike. Moving away from simple game development tools, he now primarily uses Unity3D, 3D Studio Max, and the Unreal Engine for his current project in an aim to create very high-quality games. His games can be seen on the App Store on iOS, Steam Greenlight, Amazon, and IndieCity, and of course on his website, www.wurdindustries.com. His games have been reviewed on YouTube by Action Soup Studios, and you can also find his interviews there.
Read more about Miguel DeQuadros