This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-03-17 16:52:26

minihydro
Scratcher
Registered: 2011-03-16
Posts: 50

How to make levels and lifes

Hi i am new to scartch but i dont know how to make levels or lifes?

please reply

Offline

 

#2 2011-03-17 17:34:44

minihydro
Scratcher
Registered: 2011-03-16
Posts: 50

Re: How to make levels and lifes

Hi there it will be very nice if you help me make a game, i need to put lifes and levels on the game but i dont know how to do it. but how can you do it.

please can you reply

Offline

 

#3 2011-03-17 19:20:22

ImagineIt
Scratcher
Registered: 2011-02-28
Posts: 1000+

Re: How to make levels and lifes

Lives: Well, first make a variable called lives. Make it so that whatever way they die the lives value goes down and when it hits zero make it so that whatever you want it to do when you die, like say "game over" on the screen happens.
Levels: Same thing as lives but make a variable called level and make it go up every time.

Offline

 

#4 2011-03-17 21:23:19

matthew8092001
Scratcher
Registered: 2010-09-12
Posts: 100+

Re: How to make levels and lifes

For levels, make a bunch of backgrounds on the stage. <if><touching color[ exit ]
<next background><end>
As for lives, make a variable called "lives" put in the script: if touching (thing that makes you lose lives), change lives by -1, or however many you want to decrease it by. Also remember to reset the lives to a certain amount at the beginning of your game.


http://1.bp.blogspot.com/_GVA115I1I8Y/TMGwbJ056kI/AAAAAAAABHs/kpvg0oCKV2g/s1600/happy.gif
lol

Offline

 

#5 2011-03-17 22:42:28

kingofdallamas
Scratcher
Registered: 2010-03-07
Posts: 500+

Re: How to make levels and lifes

Yes, but don't forget to add the script:
When green flag clicked
or When I receive __

if you broadcasted level change from main sprite.  big_smile
Instead of <next background/costume>, prefer using <change costume to costume ___>.
This will be better if you made the levels be a sprite instead of a background.


http://i853.photobucket.com/albums/ab99/Gilgamesh1192/Ninja%20Saga/ElementalJutsus2.gifhttp://i27.photobucket.com/albums/c192/BoomKaTish/GIF/thgfhgfhfhgf.gif
ハロー友だち!

Offline

 

#6 2011-03-17 22:43:52

kingofdallamas
Scratcher
Registered: 2010-03-07
Posts: 500+

Re: How to make levels and lifes

^ And don't forget to make sure when green flag clicked, set costume or background to the first level.  wink


http://i853.photobucket.com/albums/ab99/Gilgamesh1192/Ninja%20Saga/ElementalJutsus2.gifhttp://i27.photobucket.com/albums/c192/BoomKaTish/GIF/thgfhgfhfhgf.gif
ハロー友だち!

Offline

 

#7 2011-03-18 00:05:41

floppy_gunk
Scratcher
Registered: 2008-11-14
Posts: 500+

Re: How to make levels and lifes

You've already made a thread about this (called 'How to make levels and lifes'). Please only make one thread about a particular subject, and if no one answers, feel free to bump it (make a random post to get back to the top of the list) or just be patien and wait for a reply. Thank you.


http://img163.imageshack.us/img163/1917/2856lg.jpg Get it now!  smile

Offline

 

#8 2011-03-18 04:25:25

minihydro
Scratcher
Registered: 2011-03-16
Posts: 50

Re: How to make levels and lifes

ok thanks

Offline

 

#9 2011-03-18 14:22:27

minihydro
Scratcher
Registered: 2011-03-16
Posts: 50

Re: How to make levels and lifes

matthew8092001 wrote:

For levels, make a bunch of backgrounds on the stage. <if><touching color[ exit ]
<next background><end>
As for lives, make a variable called "lives" put in the script: if touching (thing that makes you lose lives), change lives by -1, or however many you want to decrease it by. Also remember to reset the lives to a certain amount at the beginning of your game.

okay i made lives but when i made live when  (thing that makes you lose lives) make you loose life took a long time to loose a life from 5 i put so it took quite a long time to loose a life but i want it snappy and fast to loos a life but it take long

Offline

 

#10 2011-03-18 14:41:42

minihydro
Scratcher
Registered: 2011-03-16
Posts: 50

Re: How to make levels and lifes

okay thanks for your help but i dont know how to make levels

Offline

 

#11 2011-03-18 14:53:49

minihydro
Scratcher
Registered: 2011-03-16
Posts: 50

Re: How to make levels and lifes

okay i want to make a game where you have to go to the blue blue with your character and then when you reach it i want it to go to level with a different background

pls help me

Offline

 

#12 2011-03-18 18:41:50

kingofdallamas
Scratcher
Registered: 2010-03-07
Posts: 500+

Re: How to make levels and lifes

Use this for the main sprite:

When green flag clicked
<touching color(blue)?>
<switch to background__>


This ___will be the background number.

Last edited by kingofdallamas (2011-03-18 18:42:43)


http://i853.photobucket.com/albums/ab99/Gilgamesh1192/Ninja%20Saga/ElementalJutsus2.gifhttp://i27.photobucket.com/albums/c192/BoomKaTish/GIF/thgfhgfhfhgf.gif
ハロー友だち!

Offline

 

#13 2011-03-18 20:47:25

dreamy678
Scratcher
Registered: 2011-03-18
Posts: 1

Re: How to make levels and lifes

how do you make it so if sprite 1 tuches something black that the background will change

Offline

 

#14 2011-03-19 00:09:10

kingofdallamas
Scratcher
Registered: 2010-03-07
Posts: 500+

Re: How to make levels and lifes

dreamy678 wrote:

how do you make it so if sprite 1 tuches something black that the background will change

It's the same concept!  smile

When green flag clicked
if touching color black?
change background to___

This __ shall be your background number choice.  smile  There's no such script as touching color black but this: <touching color[black] You can choose the colors when clicking the white box. Hope this helps, and scratch on, dreamy!


http://i853.photobucket.com/albums/ab99/Gilgamesh1192/Ninja%20Saga/ElementalJutsus2.gifhttp://i27.photobucket.com/albums/c192/BoomKaTish/GIF/thgfhgfhfhgf.gif
ハロー友だち!

Offline

 

#15 2011-03-29 16:54:52

Sleepykiller
New Scratcher
Registered: 2011-03-26
Posts: 1

Re: How to make levels and lifes

It doesn't work i tryed it and it turned red

Offline

 

#16 2011-03-29 19:07:40

kingofdallamas
Scratcher
Registered: 2010-03-07
Posts: 500+

Re: How to make levels and lifes

Sleepykiller wrote:

It doesn't work i tryed it and it turned red

It works if you used it for a sprite's script. So, instead of background, it should be costume. Also, use <forever> and <if> and <else> to work better. The script above was a very simple way to do it, butnot very efficient at some points. Use level for variable as the background switch as an example. Level  variable is what I shall call the variable with, but you can change it according to whatever you need to call it. So, in games, the scripts...

main sprite:
-when green flag clicked
set level to 1

-when touching color black
change level by 1

Background/sprite level thingy:
-When green flag clicked
forever
if level=1
change background to one
else
if level=2
change background to two
else if level=3 change background to three
etc.etc

These scripts are used for games to have proceeding levels. And just receiving the background change
forever if touching black
change background

There you go. Hope this helps!

Last edited by kingofdallamas (2011-03-29 19:08:49)


http://i853.photobucket.com/albums/ab99/Gilgamesh1192/Ninja%20Saga/ElementalJutsus2.gifhttp://i27.photobucket.com/albums/c192/BoomKaTish/GIF/thgfhgfhfhgf.gif
ハロー友だち!

Offline

 

Board footer