Simple Integer Problem?
ReMasteredGames
Member Posts: 101
Hi, so in my game you can pick up C4 explosives. I have an integer attribute for how many explosives the player is carrying. But I can't seem to get each C4 picked up to add by 1. In my C4 actor, I have set:
When collision with player
Destroy Actor
Set game.C4Amount to +1
But getting multiple C4's doesn't add 1 each time, so player is forever stuck with just one.
I then of course have the same issue counting back down when player uses one.
Could anyone help me? Thank you
Comments
You need to adjust it to be like this:
When collision with player
Change Attribute C4Amount to C4Amount +1
So what you are doing is taking the previous value and adding 1 to it.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Of course! Thank you so much!
You're welcome
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
By the way I love your GS recipes, they taught me how to use GS!