Changing attributes value from scene to scene
mikbio
Member Posts: 54
Hello Gs community,
I'm making a puzzle game with more than one level.
I've created an integer attribute wich represents the total moves that the player can perform in one level. Now the problem is that once created the attribute and assigned it a value, i've found the same attribute and the same value in every scene that i create. In this game every level has it's own number of move, wich is different from level to level. How can i solve this problem?
Comments
You can create an actor called controlerMoves. Create a self integer attribute called levelMoves.
Then place a change attribute in the logic stack, not wrapped in any rule so it'll fire as soon as the scene starts. Change game.Moves (your main attribute) to self.levelMoves.
Then place the actor on each scene. Then double click the actor on the scene and manually change the self attribute and enter the number of moves you want for each scene.
That should do it.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Thanks i'll try this out asap