im able to change the level, but how do i make the character dissapear once the game is over?? im seriously confused here.. sorry for being such a noob lol. help would kindly be appreciated
Offline
You want the character to hide after you finish the last level? Not too hard - You probably have a script or portion of a script that moves the spite once you finish a level. At the very beginning of that portion, put an if block that checks to see if you're on the last level, and if you are, it hides the sprite and ends the script. Also, you can put a broadcast that broadcasts that you've won. (optional) Your script might look something like this:
If level = (last) broadcast Win hide End Script EndIf
Hope that makes sense.
Offline
do i put it on the sprite script?
Offline
First make sure that you actually have a level variable, so that you can keep track of which level is the last. If you are switching levels by broadcast, just have the level variable increase after each level is completed through the broadcast. After the last level is finished, you can make the character hide using a script similar to that displayed by Harakou.
Offline
im still a bit confused... im sorry for the trouble.
Offline
Bleach_Fanatic16 wrote:
im still a bit confused... im sorry for the trouble.
First make a variable called "Level", so you can make the background switch and such, anyway, I'll just show you what you can do with "Level", if your game is a "usual" game:
<when green flag clicked><forever if><touching[ goal<change{ Level}by( 1<go to x )y
etcetera
Then you need to put this script in the main sprite, if let's say the last level of the game is Level 10:
<when green flag clicked><forever if><( <{ Level }> <=> 10 )><hide><end>
Anyway, what don't you get? Harakou said everything. (Mwahahahahahaha I am just repeating what he/she said)
Offline
OMG WHOOPS!
<when green flag clicked>
<forever if><( <{ Level }> <=> 10 )>
<hide><end>
Offline
my teacher didnt explain it to me. i got it now. thank u so much!!
Offline