Problem with change scene
Hey,
I have the following problem, when my level is completed and a button is pressed, the scene get's changed.But sometimes scene gets changed without pressing the button immediately after the level is finished.
I have these attributes:
Collect: When something is collect change to +1...
Finish: when collect = 3 set finish to true
Fail: when level fails, set fail to true
In my button I have this:
when touch is pressed
finish is true
change scene
set collect 0
set fail to 0
Can someone tell me my mistake?
thx
I have the following problem, when my level is completed and a button is pressed, the scene get's changed.But sometimes scene gets changed without pressing the button immediately after the level is finished.
I have these attributes:
Collect: When something is collect change to +1...
Finish: when collect = 3 set finish to true
Fail: when level fails, set fail to true
In my button I have this:
when touch is pressed
finish is true
change scene
set collect 0
set fail to 0
Can someone tell me my mistake?
thx
Comments
Also, where is your button, is it off screen or just alpha at 0? Because if its alpha you may want to add into the rules that alpha needs to be 1 as well as just because you can't see it, its still active
So you mean:
In the touch rule also add if self colour =1
and set collect and fail to zero before changing scene..
thx
Does the level randomly range scene after the 1st level or does it happen at 1st run as well.
Im assuming its all down to you changing scene before resetting values. That way the second you start the next level it thinks collect is still true. You should always reset your values and then change scene as the last thing you do.
And each level is based on the same principe. So somehow I have to set collect back to zero when switching to the
next scene...
Just for information, in the game fruits have to be tapped and these fruits set the attribute collect each time to a certain value.
But they only do that when finish is false AND fail is false...
It is killing me
I really try to solve it but it does not work