GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Demo for level ranking?

GamersRejoiceGamersRejoice Posts: 817Member
edited November -1 in Working with GS (Mac)
For my game I want to give a medal or star based on the score for each level. I'm wondering if anyone knows of a demo that explains this? Or if it's simple enough to explain on the forum that would help too. Thanks!

Comments

  • tenrdrmertenrdrmer Posts: 9,934Member, Sous Chef, Senior Sous-Chef
    Just a matter of using attributes set by the score and then spawn based on the attribute.
    When Score equals 10 Change attribute game.scorelevel to 1
    When Score equals 20 Change attribute game.scorelevel to 2
    When Score equals 30 Change attribute game.scorelevel to 3

    Then whatever rule decides the level is complete include these.
    when attribute game.scorelevel equals 1 Spawn Actor Bronze
    when attribute game.scorelevel equals 2 Spawn Actor Silver
    when attribute game.scorelevel equals 3 Spawn Actor Gold

    It's not my fault I never learned to take responsibility for anything. ;)

  • GamersRejoiceGamersRejoice Posts: 817Member
    Wow that seems way easier then what was swirling around in my head haha! So would I have to make those attributes for every level? As in 20 levels equals 60 attributes?
  • JohnPapiomitisJohnPapiomitis Posts: 6,256Member
    GamersRejoice said:
    Wow that seems way easier then what was swirling around in my head haha! So would I have to make those attributes for every level? As in 20 levels equals 60 attributes?

    Pretty much, but theres really no limit to the number of attributes so dont worry about that. A number of us usueally have a couple hundred per project. And just a extra bit of advice if possible keep the stars offscreen and then change there position on screen instead of spawning them.
  • GamersRejoiceGamersRejoice Posts: 817Member
    JohnPapiomitis said:
    Pretty much, but theres really no limit to the number of attributes so dont worry about that. A number of us usueally have a couple hundred per project. And just a extra bit of advice if possible keep the stars offscreen and then change there position on screen instead of spawning them.

    Cool, thanks for the help guys.
  • tenrdrmertenrdrmer Posts: 9,934Member, Sous Chef, Senior Sous-Chef
    GamersRejoice said:
    Wow that seems way easier then what was swirling around in my head haha! So would I have to make those attributes for every level? As in 20 levels equals 60 attributes?

    I think you could actually accomplish this with one attribute per level and just use an integer. 1, 2, or 3
    Booleans seem to be less resource intensive but in would be very easy to miss a rule and leave 2 checked for the same level.

    As for spawning or not I would actually use a change image. But that really depends on your level icons if you can see numbers and what not through the star badge then this way would make your game very big since you would need 4 images per icon. If the level numbers do not appear through the star then you could have 3 level icons with each star color and when the level is not complete it shows an icon with the level number and when it is complete it changes to one of the 3 completion icons.

    I feel as though I am rambling now so sorry if that makes no sense.

    Happy New Year

    It's not my fault I never learned to take responsibility for anything. ;)

This discussion has been closed.