I did make a Level Variable but It didnt seem to help at all. How do I make it so when one health runs out, it switches to the next level and changes characters.
http://scratch.mit.edu/projects/i_caught_fire_2/385230
Offline
If you mean that when the SPRITES' health has run out, what you need to do is this:
Make a health variable for each sprite, including the one you are playing as, and a level variable. At the beginning of the game, set the level variable to 1 and the health variable to however much health you want you and the enemies to have. Say the sprite you are playing as is called Sprite1, and the enemies are called Enemy1, Enemy2 etc. You need to make a script like this for all the enemy sprites and the sprite you are playing as:
[blocks]<when green flag clicked>[/blocks]
[blocks]<forever if>[/blocks][blocks]<( [blocks]<{ health }>[/blocks] <=> 0 )>[/blocks]
[blocks]<set{ level }to( 2[/blocks]
[blocks]<broadcast[ next level ]and wait c>[/blocks]
[blocks]<end>[/blocks]
Then what will happen is that when the enemy's health or your health has run out, the level will change. If you want ALL the enemies' health to run out before the level changes though, you'll need to include an
[blocks]<< <and> >>[/blocks]
to your script.
Hope this helps! If it doesn't, just let me know!
Happy Scratch-ing!
Offline
Thanks. I acualy finished it last night... at 1 am.............................................................................................................................
Offline