Well, you could use color sensing. You can put a goal on the end of the level that is gray, and then make it so that when the sprite touches gray it broadcasts "next level."
Then you can give the stage a script that says when it receives "next level" to switch the next background.
Offline
Your question is really vague.
You could just have another background then whenever whatever is doing whatever than makes it go to the next level make it switch to that background.
Offline
Hiiii. i'm a new scratcher designing a pacman style game and i'm also having trouble with the multiple levels/switching to next background part of the game. I've read the other posts about broadcasting, so I did that, but now when i play the game and i'm at level one, i press the green flag, start moviing toward the key(which is the goal for the sprite), and it works for that but then for level two i have to press the green flag again for it to respond and go to level three.
My sprite script for the background looks like :
[blocks]<when green flag clicked><forever if><touching color[box with color<broadcast[ Next Level<stop script> [/blocks]
And then the stage script is :
[blocks]<when I receive[ Next Level[/blocks] next background
I know this is really long... and i dont know if i did the add blocks to post thing right
but i'm really stuck, any feedback u guys have is appreciated.
Offline
You have to be a little careful of putting a broadcast in a Forever loop with sensing. What might be happening is that you are getting more than one message sent when the color is touched. You might try putting a Wait in there to slow the loop down after the sensing takes place. Or put a Wait until Not touching the color.
You might also want to just share your project to the web and give us a link to it. It's a lot easier to debug something when you have all the scripts to work with
Offline
shelby56 wrote:
Hiiii. i'm a new scratcher designing a pacman style game and i'm also having trouble with the multiple levels/switching to next background part of the game. I've read the other posts about broadcasting, so I did that, but now when i play the game and i'm at level one, i press the green flag, start moviing toward the key(which is the goal for the sprite), and it works for that but then for level two i have to press the green flag again for it to respond and go to level three.
My sprite script for the background looks like :
[blocks]<when green flag clicked>
<forever if><touching color[
<broadcast[ Next Level
<stop script> [/blocks]
And then the stage script is :
[blocks]<when I receive[ Next Level[/blocks] next background
I know this is really long... and i dont know if i did the add blocks to post thing right
but i'm really stuck, any feedback u guys have is appreciated.
maybe remove the [blocks]<stop script>[/blocks]
Offline
The Stop Script is stopping your forever if loop, and you have to click the green flag to start it again. And I agree with Paddle2See, you have to make sure the character is not touching the key when it begins the loop over again, replace the Stop Script with a <wait( 0.1 )secsc>
Offline