Collectables and leader boards
zamboni77
Member Posts: 40
Hi there
I was wondering if anyone knows how to stop collectables respawning after dying and how to create a leader board.
Thanks
Graham
I was wondering if anyone knows how to stop collectables respawning after dying and how to create a leader board.
Thanks
Graham
Comments
Rule: If game.dead = false
Spawn collectible
Or
Rule: If game.gameOver = false
Spawn collectible
You'll have to program the attributes to switch between true and false accordingly in your game.
If you want to use one for when the character dies you would set game.died or game.dead (whatever you want to call it) as true, and when you're ready to start the game again with the next life or a new game completely you set the attribute to false. While it's true, the rules around the spawning of collectibles will stop the collectibles from spawning.
I don't know of any tutorials to create leaderboards but I managed it easily enough without one. You do most of the work on iTunes Connect and there's instructions all over the screen as to how to fill in the relevant text boxes. In GameSalad it's as simple as dragging the Game Centre - Post Score behaviour, and filling in the two text boxes, one with the score attribute and the other with the leaderboard id you've given to the leaderboard on iTunes Connect. When you type in the leaderboard id, make sure you type it in without pressing the expression button.