Help with Star System

MOVProductionsMOVProductions Member Posts: 53
edited November -1 in Working with GS (Mac)
How do i create a star system in which the actor collects 3 stars and at the level select menu it will show the stars on the bottom of each level

Comments

  • FloridaGamesFloridaGames Member Posts: 328
    make a game attribute: starscollected
    then put 3 stars on the bottom screen.
    Give the stars the behavior: change attribute: self.color.alpha to 0.
    then give your character or the stars in the game this rule:
    when overlapp/collide with star/character then :
    change attribute game.starscollected to game.starscollected+1
    give the first star on the bottom this rule:
    when attribute game.starscollected = 1
    change attribute (i would actually use interpolate attribute if you want a cool fade to view effect) self.color.alpha to one.
    then do that with star one and 2 except with when game.starscollected = 2,3.
  • MOVProductionsMOVProductions Member Posts: 53
    okay thanks do i have to make a no stars collected attribute for each level?
  • FloridaGamesFloridaGames Member Posts: 328
    no just reset it back to 0 after each level.
  • MOVProductionsMOVProductions Member Posts: 53
    ExplosiveApps said:
    no just reset it back to 0 after each level.

    But if I do that how will I show what they got for each level on the level select like angry birds?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Mikhail616 said:
    But if I do that how will I show what they got for each level on the level select like angry birds?

    have a extra attirbute for each level called highStarCount or whatever you want. Then change that attribute to starsCollected before you change starsCollected to 0 on your level reset
  • MOVProductionsMOVProductions Member Posts: 53
    Okay thanks
Sign In or Register to comment.