transition to new scene while keeping changed information from old scene

sorry in advance if this is covered....i've only spent a few hours with gs so i'm a total newbie.

background:
i'm working on a game which has 25 boxes... in the first screen 1 all twenty five boxes (actors) are blank.
in screen two, a text question appears above the boxes and four of the squares now have possible answers inside them.

player only gets one choice. when a player clicks on a graphic, an "X" or an check mark appears to indicate if they guessed correctly.

I wish to then move on to a new scene, where the three "unchosen" boxes are reset, but the box that was chosen, whether or not it was correct or incorrect, remains with it's corresponding "x" or check mark.

Currently, my thought is that I have a new scene, with all the same boxes..but somehow retain info from the last scene. Is it even necessary to create a new scene...or should i be using a table for this....(i've been constructing this without a table so far)

thanks in advance for the help....

Answers

  • DevirosDeviros Member, PRO Posts: 87
    edited December 2015

    Ok, so - first - i'd like to suggest that you don't change the scene at all - you're adding 'loading' time to your game/app that doesn't need to be there, as you're not really doing anything that requires it. I used to swap scenes all the time for different things, but i eventually realized the you get a FAR better User eXperience if you don't swap the scenes.

    To the actual answer to your questions, if you do actually want to swap scenes, you should store the pertinent variables in either the game variables, (i.e. INT_chkbox_1_data (where it could be 0 (empty), 1 (checked), 2 (x-ed)) - or in a table that is dedicated to storing all the check box statuses.

    `TBL_Chxbox_Status

                          Box_Status
        Box_1               0
        Box_2               2
        Box_3               1
        Box_4               0`
    

    Using this method, you'll be able to transfer data to any scene, at any time, without any trouble.

    Again - though - i would HIGHLY recommend you use a single scene for this.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Definitely use a table and yes, a single scene would be best. It's very easy to reset a table with 25 or 250 values for that matter. It's harder with individual attributes so it's worth it to learn how to use tables in GameSalad. There are very good tutorials and I usually start by Googling gamesalad and a term, e.g. gamesalad tables

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.