How to make character unlocks?

Braydon_SFXBraydon_SFX Member, Sous Chef, PRO, Bowlboy Sidekick Posts: 9,271
edited November -1 in Working with GS (Mac)
Hey there,

Just about done with my game, just need a little bit more help.
How would I make character unlocks?

Example: Finish world one and you unlock a new character?

I think I have a way on how to do it, but I thought I might as well post it here and see your answers for the easiest way on doing this.
This should also be a useful thread for some people in the future.

Thank you all,
Bray

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, PRO, Bowlboy Sidekick Posts: 9,271
    Hey Uptimistik - Do I need to put a Save Attribute in there somewhere?
  • Braydon_SFXBraydon_SFX Member, Sous Chef, PRO, Bowlboy Sidekick Posts: 9,271
    Title scene meaning Menu scene?

    Cause when they press the character, it brings them to the main menu. And then they can select which level they want to play.
  • Braydon_SFXBraydon_SFX Member, Sous Chef, PRO, Bowlboy Sidekick Posts: 9,271
    Okay, so I did that. And it use to work before I added the save and load attribute. But now it won't change the image on the character. It will however, change the image on the unlock character icon that I put the 'When attribute game.unlockcharacter1 is true, change image'
    It will do that fine.

    Could it be that I need to put the load attribute in the character actor?
  • Braydon_SFXBraydon_SFX Member, Sous Chef, PRO, Bowlboy Sidekick Posts: 9,271
    For the load attribute on the menu scene, I just created an actor off screen and added the load attribute, is that okay?

    Okay, but what if I want to change back to the original character?
    Same thing, just different attribute?
  • Braydon_SFXBraydon_SFX Member, Sous Chef, PRO, Bowlboy Sidekick Posts: 9,271
    Im using a Boolean attribute

    So I have my main character, and when you beat level 30 you unlock a new character. Then, like I was told, I go to the unlock character icon, and make rule when attribute game.unlockcharacter1 is true - change image - and then save attribute.

    That works I think.

    Now, If I want to go back to the original character I have an icon for him too.
    When touch is pressed : Change image to OriginalCharacter - Save attribute game.originalcharaceter.

    But it seems it works for the first time, it will change to unlock character, then back to original character, then it wont work anymore, its stuck on the original character.

    What if I used a integer attribute.

    So when attribute game.unlockcharacter1 = 1
    Change image to unlock character,
    Save attribute etc

    Then it might work for the other one?
    Hope Im making sense. :)
  • Braydon_SFXBraydon_SFX Member, Sous Chef, PRO, Bowlboy Sidekick Posts: 9,271
    Im still not getting it, grr.
    Maybe I won't have unlock able characters. Maybe just Achievements or something. Something where you just have to change an image. :P
  • Braydon_SFXBraydon_SFX Member, Sous Chef, PRO, Bowlboy Sidekick Posts: 9,271
    Sent you a PM
  • Braydon_SFXBraydon_SFX Member, Sous Chef, PRO, Bowlboy Sidekick Posts: 9,271
    Sent you one again :D
  • Braydon_SFXBraydon_SFX Member, Sous Chef, PRO, Bowlboy Sidekick Posts: 9,271
    Take your time. Ill still be here.
  • TheBoss_123TheBoss_123 Member Posts: 60
    Here's my take on it. (Assuming Character unlock is due to completed levels)

    -----------------------------------------------------------------------

    Now picture it like me:
    There is a scene with two images
    Hero 1 and Hero 2
    Hero 2 is locked and therfore you cannot touch it

    Create attribute, Game.Hero...Integer...................1
    Create Attribute, Levels Completed..Integer.........25
    Create Attribute, Hero-2-Unlock...Boolean............False
    Create Attribute, Choice Enabled..........................False

    -Start Rule-
    If Levls Completed >= 25
    Change attribute, Hero-2-Unlock..................True
    Save attribute Hero-2-Unlock...Key: unlocked
    -End of-

    -Start Rule-
    If Hero-2-Unlock........True
    Change image: Hero2SelectLocked .....to Hero2SelectUnlocked
    Change attribute: Choice Enabled.........True
    -End of-

    -Start Rule-
    If Choice Enabled......True
    AND
    touch is pressed Hero 2
    Change Attribute, Game.Hero.......................2
    -End of-

    -Start Rule-
    If touch is pressed Hero 1
    Change Attribute, Game.Hero........................1
    -End of-

    In Each Level now do this
    -If Game.Hero......................1
    Spawn actor Hero 1, Position (x,y)
    -End of-

    -If Game.Hero......................2
    Spawn actor Hero 2, Position (x,y)
    -End of-

    -----------------------------------------------------------------------

    Its probably not the most efficient way, I am still a novice at gamesalad myself,
    but I would assume this is how it works.

    Anyway
    Cheers
    TheBoss_123
  • TheBoss_123TheBoss_123 Member Posts: 60
    Hope it works, and please do tell if it does.
    Cheers
    TheBoss_123
  • Braydon_SFXBraydon_SFX Member, Sous Chef, PRO, Bowlboy Sidekick Posts: 9,271
    Hey there,

    Ill try that later on tonight. Thanks for you help.
    I'll let you know how it turns out. :)
Sign In or Register to comment.