Reseting Multiple Attributes

osucowboy18osucowboy18 Member Posts: 1,307
edited November -1 in Working with GS (Mac)
Hey guys, in my latest game, I have added a feature that will let the user clear their high scores if they so choose. Now obviously, I could just go in and manually change all values to zero, or whatever the appropriate default value is. However, is it possible to reset the values of multiple attributes within GS to their default values more quickly than using a lot of Change Attribute behaviors? Thanks.

- Alex

Comments

  • EatingMyHatEatingMyHat Member Posts: 1,246
    as far as I know, you do it one by one...
  • ozboybrianozboybrian PRO Posts: 2,102
    Yeah, that's pretty advanced. If Gs does that, they have a lot of other cool things to do lol. like Animation editing!!! : )
  • NachozNachoz Member Posts: 52
    im thinking the reset game behavior might do the trick for you but i could be wrong
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    Nope you have to do it manually. Reset scene just resets actors positions not attributes
  • Rob2Rob2 Member Posts: 2,402
    reset scene does reset scene and actor self attributes so get creative!
  • MotherHooseMotherHoose Member Posts: 2,456
    nacho420 said:
    im thinking the reset game behavior might do the trick for you but i could be wrong

    Reset Game will reset all Attributes to what you originally coded...
    but if you have saveAttributes... they stay ...
    and if you have load attributes on the main screen they load...

    I tried 2 triggers on main screen
    1. one for loading keys for loading attributes like levels unlocked and added a key for reset boolean
    2. and separate trigger for loading high scores...Rule initiate event with a boolean a gameAttribute reset:
    ...true for loading the high scores...false for not loading

    and that is a little crazy

    on reset Actor Rule when user selects delete high score:
    changeAttribute HighScore1 To: 0 and etc. (as everyone tells you... you gotta do the individual ones)
    and SaveAttribute each 0 attribute...in your previous load keys...

    and then you have to trigger that reset boolean and save it so next open will load/display current
    HighScores.

    ==
    and if all that didn't confuse you... please explain it to me!

    MH
  • osucowboy18osucowboy18 Member Posts: 1,307
    Ok thanks guys. Hopefully GS will add in this feature sometime soon :)

    - Alex
Sign In or Register to comment.