Next Level problem with Paused Screen
PetCro
Member Posts: 21
Hi guys,
Hope somebody can help me with the below "Next Level" problem.
I created a "Paused Scene" for "Level Complete"-option:
A) Rules for the "Next Level" actor in the Paused Scene:
-If Touch is pressed
-Change attribute game.NextScene to true
Unpause game
Rules in Scene:
-If game.NextScene is true
-Timer: after 0.1 sec Change Scene to Level 2 (next scene)
Change attribute: game.NextScene to false
This works, but when I win the Level 1 and click on the "Next Level" actor in the Paused Scene, the last level appears instead of the Level 2. I think the problem is, that the "game.NextScene" doesn't change to false after the Level 2 starts and as the NextScene is still true, it will go to the next scene, and again next scene till it reaches the last Level...
So my question: How can I resolve this problem?
Thanks
Pete
Hope somebody can help me with the below "Next Level" problem.
I created a "Paused Scene" for "Level Complete"-option:
A) Rules for the "Next Level" actor in the Paused Scene:
-If Touch is pressed
-Change attribute game.NextScene to true
Unpause game
Rules in Scene:
-If game.NextScene is true
-Timer: after 0.1 sec Change Scene to Level 2 (next scene)
Change attribute: game.NextScene to false
This works, but when I win the Level 1 and click on the "Next Level" actor in the Paused Scene, the last level appears instead of the Level 2. I think the problem is, that the "game.NextScene" doesn't change to false after the Level 2 starts and as the NextScene is still true, it will go to the next scene, and again next scene till it reaches the last Level...
So my question: How can I resolve this problem?
Thanks
Pete
Comments
Pause Scene
If touch change GameLevel to GameLevel+1
Save GameLevel (for reload at star scene)
After 0.01 unpause game
Rule in scene
If gamelevel=2 after 0.01 change scene to level2
You can use this Logic
Thanks for your help, it works now
Pete