How do i do a checklist

beefy_clyrobeefy_clyro Member Posts: 5,394
edited November -1 in Working with GS (Mac)
hi. basically i have a checklist which is numbered, the checklist relates to another part of the app that comes with the description for that number. On the checklist i would like them to be able to touch the screen and it spawns an actor (maybe a tick in a check box). How could i make that save so next time they start the app it remembers what has been checked? thanks in advance

Comments

  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    Ok, not an expert by any means...not even finished my 1st game yet.....and I'm not on my GS laptop...actually busy at work :-)
    .........

    To create one tick box, like a toggle button.
    .........
    Create an integer attribute 'game.tickbox1'
    On your button, make a rule,
    if touch is pressed,
    change attribute 'game.tickbox1' to (game.tickbox+1)%2
    ........
    To show the tick:
    ........
    If 'game.tickbox1' = 1
    Change image to tick
    if 'game.tickbox1' = 0
    change image to blank.

    To save the tickbox so it remembers after closing the app.

    Add a rule to the 'if button touched'

    save attribute 'game.tickbox1' to key 'tickbox1'
    .........

    Then on the first screen of your game, normally the company logo splash screen,

    have a rule,

    load attribute, key 'tickbox1' = 'game.tickbox1'
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Legend. Works a treat. Thanks. Massive ball ache though, gotta do over a hundred of them
  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    Glad it worked. There is a way to do a hundred easily bit it envoves employing and training an army of monkeys.
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    I never knew what the % and a number did as i had seen it in a couple of peoples explanantions, thats well handy to know, thanks for that. I was almost there but didnt think to use change image, i was spawning an actor instead but i soon realised i would need a hundred actors for the attributes which wouldnt of been practical. As for the monkeys, if you can get them to create shakespeare, im sure we can train some to make a game ;)
Sign In or Register to comment.