Collectables and leader boards

Hi there

I was wondering if anyone knows how to stop collectables respawning after dying and how to create a leader board.

Thanks

Graham

Comments

  • KevinCrossKevinCross London, UKMember Posts: 1,894
    Put a rule around your current spawn behaviours similar to this:

    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.
  • zamboni77zamboni77 Member Posts: 40
    Ok that's great will try that thank you. Any one know of tutorials to create leaderboards
  • zamboni77zamboni77 Member Posts: 40
    What attribute would I use? Sorry still new to this
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    edited September 2013
    The attribute won't exist, you'd have to add it. You want one to store whether or not the character has died and/or one for when the game is over. You can use index/integer attributes with modulo operator or simple booleans for true and false.

    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.
  • zamboni77zamboni77 Member Posts: 40
    That's a big help. Thank you so much for taking the time out to help me
Sign In or Register to comment.