populating scene
kamille88
Member Posts: 1
Hello World,
I am trying to create a "pick your character" and "pick your scene" function. Its easy enough to make certain actors trigger certain scenes, but what I want to do is have game salad remember both the scene and the actor and then populate said scene. Does anyone know how to do this?
thanks a bunch!
-Kamille
I am trying to create a "pick your character" and "pick your scene" function. Its easy enough to make certain actors trigger certain scenes, but what I want to do is have game salad remember both the scene and the actor and then populate said scene. Does anyone know how to do this?
thanks a bunch!
-Kamille
Answers
When your player chooses an actor and a level, change those game attributes to whatever values they should be (e.g. character 3 and level 1). Save both attributes to separate keys using the Save Attribute behavior. Then make a "Populate Scene" actor that sits off scene or is invisible (self.color.alpha=0) and give it the following rules:
When [condition for when you want to load the character and level]
Load attribute [character key] --> game.character
Load attribute [level key] --> game.level
When attribute game.level=1
Timer after 0.1 seconds*
Change Scene [level 1]
Do this for each possible value of game.level
In your character actor, add the following rule:
When attribute game.character=1
Change Image [image name]*
etc.
Do this for each possible value of game.character
*The timer is there so that the change scene doesn't occur until the attributes have had a chance to load.
**If your character actor is on the same scene as the Populate Scene actor, you will need a short timer here as well.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User