Need help with actor conditions

Spalding004Spalding004 Member, BASIC Posts: 89
edited April 2014 in Working with GS (Mac)

In my game I have a shop that allows the player to purchase "upgrades" that change the mechanics of the game itself, like changing the effectiveness of powerups, etc. I was having the upgrades being purchased by the player tapping on a button actor and it subtracting the correct amount of currency and applying the upgrade. This works well, unless you have enough currency for more than one level of upgrade; it just runs through them until it can't anymore.


(There are five of these, each with a different value (95, 85, 75, 65, and 55) )

The actor checks the value of the attribute your are currently modifying, checks to make sure that you have ample currency, and then changes the attribute accordingly and subtracts the correct amount of currency. The problem is, if you hold it down, it then reads the newly changed attribute and runs through again, until you run out of money. Ideally, if there were a way to make gamesalad stop once it reaches the end of a conditional that would solve my problem. I tried changing it to on released instead of pressed, but that just saved up the touch and bought every tier as soon as I released it.

I even tried making it destroy itself and spawning a duplicate actor in its place with the next tier of rules, but it still continued all the way through.

Is there anyway I can make it so that it doesn't continuously run the conditional if you hold down the button?

EDIT: NVM, I have solved this problem.

Sign In or Register to comment.