Shortcut: track all levels and save progress with one prototype.
JamesZeppelin
Member Posts: 1,927
OK so you have a 100 levels and you want to track and unlock them one as you progress.
This is not a complete guide just a short cut for the tracking.
I found that it can be done with one prototype and only two attributes
You can use scene.scenename for your save attribute.
Next you would name your levels 01, 02, 03, 04, 05, 06, etc (not all scenes just the levels you want to track and unlock)
Now I know what you are thinking "you cant put a scene attribute in a prototype"
Ahh. but you can. You cant see it but game salad will read it.
1. Just make an actor but dont worry about name because you will delete this actor.
2. Make a rule that changes your game attribute to scene.Name
3. Drag this rule into your custom behaviors.
4. Now make a new prototype called something like "track levels"
5. Drag the tule into the actor from your custom behaviors. It will look incomplete like it just says change to "scene" but, dont worry scene.Name is actually there. When you drop the actor into a level you can open it up to verify.
I included a screen of what i have in my actor so you can see what i did to save the highest level completed. THe top rule is the one i am speaking of. If i was to open this same actor in the prototype pane you wouldn't see the entire rule. The beauty of this is it will stay locked so you can still add something to this actor in everyscene still.
How you want to use this info is up to you. I used to unlock the highest level played.
Note: The attribute Game.lastplayed would be better titled "game.highestplayed"
This is the end result.
AGAIN what you do with this info is up to you.
These are the rules i used to unlock each level (little orange box with a number on it) . I just made a prototype with the rules below and and made a "locked" image. Then i dragged the actor into the scene 10 times and opened each one and changed the numbers to the scene number. Then dragged a new image over it for the right scene number. You will still need to open these little guys individually but its not so bad since they are all on the same scene. Where you save the time is not having to edit an instance in every scene to track your level progress.
If you wanted to just use this for a continue feature it would be really quick.
This is not a complete guide just a short cut for the tracking.
I found that it can be done with one prototype and only two attributes
You can use scene.scenename for your save attribute.
Next you would name your levels 01, 02, 03, 04, 05, 06, etc (not all scenes just the levels you want to track and unlock)
Now I know what you are thinking "you cant put a scene attribute in a prototype"
Ahh. but you can. You cant see it but game salad will read it.
1. Just make an actor but dont worry about name because you will delete this actor.
2. Make a rule that changes your game attribute to scene.Name
3. Drag this rule into your custom behaviors.
4. Now make a new prototype called something like "track levels"
5. Drag the tule into the actor from your custom behaviors. It will look incomplete like it just says change to "scene" but, dont worry scene.Name is actually there. When you drop the actor into a level you can open it up to verify.
I included a screen of what i have in my actor so you can see what i did to save the highest level completed. THe top rule is the one i am speaking of. If i was to open this same actor in the prototype pane you wouldn't see the entire rule. The beauty of this is it will stay locked so you can still add something to this actor in everyscene still.
How you want to use this info is up to you. I used to unlock the highest level played.
Note: The attribute Game.lastplayed would be better titled "game.highestplayed"
This is the end result.
AGAIN what you do with this info is up to you.
These are the rules i used to unlock each level (little orange box with a number on it) . I just made a prototype with the rules below and and made a "locked" image. Then i dragged the actor into the scene 10 times and opened each one and changed the numbers to the scene number. Then dragged a new image over it for the right scene number. You will still need to open these little guys individually but its not so bad since they are all on the same scene. Where you save the time is not having to edit an instance in every scene to track your level progress.
If you wanted to just use this for a continue feature it would be really quick.
Comments
Hi James, that is radical! How on earth did you discover that! Excellent stuff; I don't pretend to have got my head around it completely yet, but I can foresee the advantages of this - what seems to be - an undocumented and original way of using GS.
:-)
PS I wanted to write "Well done!" but I might have sounded like a school teacher! Thanks for sharing.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
It is a bit confusing since the text dissapears on you.
Is there a way to specify attribute types etc. as I'm having trouble figuring out what's what?
Thanks for sharing this.
Mike
Thank you for sharing
Glenn
So! you can make a Behaviors to read the scene.attribute, then add the Behaviors to Prototype, so the actor can read that scene attribute.
That will be great if it's work, but not sure will it's work when GS update!?