Replay a completed level?
gilamonster
Member Posts: 31
I have a select level page with no levels locked. Once each level is complete I would like for the level to be able to played again. On the levels page each level is an image in which I has set up a rule set so that when
game.level1=game.level complete
Change image to an image with a check mark to indicate that level has been completed.
But when this image is clicked on again the level will not play again it goes to the page but displays the level complete graphic that happens when the level is completed and doesn't allow the level to be played again.
I am new so I know I am missing something, any help on how I can fix this would be great!
thanks
game.level1=game.level complete
Change image to an image with a check mark to indicate that level has been completed.
But when this image is clicked on again the level will not play again it goes to the page but displays the level complete graphic that happens when the level is completed and doesn't allow the level to be played again.
I am new so I know I am missing something, any help on how I can fix this would be great!
thanks
Comments
I don't need to use the Reset Scene behavior for this?
Hope that makes sencse im falling asleep over here lol
Firstly set up the following attributes:
TYPE - NAME
Boolean - LevelOneComplete
Boolean - LevelOneUnlocked
Integer - LevelOneScore
In the first level scene do the following:
For example we say the level is complete when you get 1000 points
In the actor which displays points add the following rules:
RULE - When LevelOneScore = 1000 (When the score is 1000)
Change attribute LevelOneUnlocked to true (Change that attribute to 1000)
Save Attribute LevelOneUnlocked (Important to save otherwise wont work when you restart the game)
Spawn actor - Level 1 complete graphic (This will spawn your level complete graphic)
In the level select scene add the following to the actor for the first scene
RULE - When LevelOneUnlocked = true
Change image to check
SECOND RULE - When touch is pressed and LevelOneUnlocked is true
Change scene to level 1
Hope that helps
Would using game.stage1 = game.level done
game.stage2 = game.level done
be another way to do it?
For Booleans there is only two possible ways it could be, which is true or false
For integers you can put practically any number you want in there.
Play around with what I put above, there are numerous different ways to achieve what you are looking to achieve and im sure there are a few ways much better that ive shown you.
Its always best to play around with it so you fully understand it, keep at it it wont take long before you get it.
Joe
For example:
Save attribute -
NAME OF ATTRIBUTE KEY
LevelOneUnlocked - Level1
Then when you load just do the same, i.e
NAME OF ATTRIBUTE KEY
LevelOneUnlocked - Level1
Load the attribute at the start screen
Change attribute LevelOneUnlocked to true (Change that attribute to 1000)
Are you saying that in the box where true is - change it to 1000?