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:
That should be all you need.Whenclicked
Switch to backgroundfirst level ▼Forever iftouchingend point ▼?Next background
Offline
turkey3 wrote:
Hmm... I think I need more info. But of you have a script like this:
That should be all you need.Whenclicked
Switch to backgroundfirst level ▼Forever iftouchingend point ▼?Next backgroundwait untilnottouchingend point ▼?
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 untilcomplete?=0repeat untilcomplete?=1next backgroundwait2secondsset 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 untilcomplete?=0repeat untilcomplete?=1next backgroundwait2secsswitch to backgroundbackground1 ▼
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
but then when I go to the next level it continues to switch I couldn't figure out how to make it stop.....when I recieve10repeat untilswitch to backgroundbackground 8wait1.5secondsswitch to backgroundbackground 9wait1.5seconds
Offline
YodaTroll wrote:
Thanks for the help....... I forgot to go back on the forums for like a week...
uhm this is what I hadbut then when I go to the next level it continues to switch I couldn't figure out how to make it stop.....when I recieve10repeat untilswitch to backgroundbackground 8wait1.5secondsswitch to backgroundbackground 9wait1.5seconds
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
I 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 broadcastedwhen I recieve10repeat untilswitch to backgroundbackground 8wait1.5secondsswitch to backgroundbackground 9wait1.5seconds
and 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 dowhen I recieve11setcomplete1to 1repeat untilswitch to backgroundbackground 10wait1.5secondsswitch to backgroundbackground 11wait1.5seconds
Offline