is there a count function in gamesalad?
Hipster_Owl_Studios
Member, PRO Posts: 214
I want to have a scoring system for my game where every three enemies destroyed = 1 point. I've played around by having two attributes game.zombiesKilled and game.killpoints I had a rule that says:
game.zombiesKilled = 3 change attribute Game.killpoint to game.killpoints + 1
and that obviously wasn't correct. any ideas on how to take this on? thank you.
Comments
Just have a single attribute, let's call it ZKill.
Every time an enemy is destroyed change ZKill to ZKill +1
Display (or otherwise use) your score as floor(ZKill/3)
Example: https://www.mediafire.com/?9vqql88ivvobnra
thank you very much! I will give this a shot!
Perhaps this: game.count =0
when enemy1 is destroyed change attribute game.count to game cont+1
when enemy2 is destroyed change attribute game.count to game cont+1
when enemy3 is destroyed change attribute game.count to game cont+1
when game.count is=3 change attribute game.count to 0
spawn score
set your start score at 0.3333333 and floor the score keeper so it only increase when hits 1 or 2 ETC I made a example.