I am making a maze game and I have two backgrounds that keep switching back and forth and I don't know how to make them stop switching back and forth once the player has completed the level..
please post help or a link if this topic has already been discussed.
Thanks...
Offline
Could you please upload the project? Then we could see what's wrong.
Offline
Hmm... I think I need more info. But of you have a script like this:
When gf clicked Switch to background [first level v] Forever if <touching [end point v]?> Next backgroundThat should be all you need.
Offline
turkey3 wrote:
Hmm... I think I need more info. But of you have a script like this:
When gf clicked Switch to background [first level v] Forever if <touching [end point v]?> Next background wait until <not <touching [end point v]?>>That should be all you need.
I fixed it.
Offline
Hey there,
you can achieve this in one script for sure, just set up something like this on the Background.
Firstly: Make a new variable called "complete?" or something. When the level starts, set this to 0 and when the goal is reached set this to 1. Then you can make this script.
wait until <(complete?) = [0]> repeat until <(complete?) = [1]> next background wait [2] seconds end set background to background1
Offline
Prestige wrote:
Hey there,
you can achieve this in one script for sure, just set up something like this on the Background.
Firstly: Make a new variable called "complete?" or something. When the level starts, set this to 0 and when the goal is reached set this to 1. Then you can make this script.wait until <(complete?) = [0]> repeat until <(complete?) = [1]> next background wait [2] secs end switch to background [background1 v]
Fixed it a bit!
Offline
Thanks for the help....... I forgot to go back on the forums for like a week...
uhm this is what I had
when I recieve [10] repeat until <> switch to background [background 8] wait (1.5) seconds switch to background [background 9] wait (1.5) secondsbut then when I go to the next level it continues to switch I couldn't figure out how to make it stop.....
Offline
YodaTroll wrote:
Thanks for the help....... I forgot to go back on the forums for like a week...
uhm this is what I hadwhen I recieve [10] repeat until <> switch to background [background 8] wait (1.5) seconds switch to background [background 9] wait (1.5) secondsbut then when I go to the next level it continues to switch I couldn't figure out how to make it stop.....
I'm going to go test the suggestions now
. . . ok more background on the project... Basically a red square moves around and once it hits the endzone it broadcasts a number. when the other end of the commands receives the number it changes the background to another maze... when ever you hit the color black you "die" and go back to the beginning......
soooooo
I have it so that after level 6 it broadcasts 10
and then it does what I posted
when I recieve [10] repeat until <> switch to background [background 8] wait (1.5) seconds switch to background [background 9] wait (1.5) secondsI changed it to what TorbyFork234 and Prestige said to do... and when the sprite hits the color gray (the color for the end of level 7) 11 gets broadcasted
when I recieve [11] set [complete1] to 1 repeat until <> switch to background [background 10] wait (1.5) seconds switch to background [background 11] wait (1.5) secondsand after the background switches to number 10 it goes back to 8 then 9 then 10 then 11 and does what it is supposed to do
Offline