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

#1 2008-08-07 01:57:50

sonic2000
Scratcher
Registered: 2008-07-21
Posts: 26

how do you make a game

how do you make a game like with lives and scores


i like video games and scratch!

Offline

 

#2 2008-08-07 02:00:20

sonic2000
Scratcher
Registered: 2008-07-21
Posts: 26

Re: how do you make a game

anyone here?


i like video games and scratch!

Offline

 

#3 2008-08-07 04:06:39

SonicPops
Scratcher
Registered: 2007-06-10
Posts: 100+

Re: how do you make a game

Well, what 'kind' of game? I can help you with lives and scores.
So, make 2 variables - lives and score. Then, do this script (I'm rubbish at explaining but here goes)

<when I receive[ died
<change{ lives  }by( -1

Then, for score...
<when I receive[ enemy died
<change{ score }by( 1

Hope that helps  smile


smile  Go Crank. Inc!  smile
Not much to say  wink

Offline

 

#4 2008-08-07 11:02:54

Robin7
Scratcher
Registered: 2007-11-09
Posts: 100+

Re: how do you make a game

Here is a simple game with lives. http://scratch.mit.edu/projects/T_E_P/145727

Offline

 

#5 2008-08-07 11:06:07

Robin7
Scratcher
Registered: 2007-11-09
Posts: 100+

Re: how do you make a game

And here is a project with health and a score. http://scratch.mit.edu/projects/Lanie/212104  Looking a the script for these projects could help you.

Offline

 

#6 2008-08-08 22:32:48

terminator355
Scratcher
Registered: 2008-07-31
Posts: 100+

Re: how do you make a game

also if you want moving put this in yur sprite:
[blocks]
<when green flag clicked>
<forever>
<if><key[ right ]pressed?>
<change x by( 5 )>
<end>
<if><key[ left ]pressed?>
<change x by( -5 )>
<end>
<if><key[ up ]pressed?>
<change y by( 5 )>
<end>
<if><key[ down ]pressed?>
<change y by( -5 )>
<end>
<end>


No new stuff for now guys  wink  join me for some Black Ops on xbox: termhn or for some rock band on PS3: rocket232

Offline

 

#7 2008-08-08 22:47:42

terminator355
Scratcher
Registered: 2008-07-31
Posts: 100+

Re: how do you make a game

and in your enemy put this also to make the lives work:
[blocks]
<when green flag clicked>
<forever>
<if><touching[ (players sprite) ]>
<broadcast[ died ]
<end>
<end>
[/blocks]

and put this in your enemy sprite, asuming you are using a red object/weapon or if you have a whole sprite for a weapon change [blocks]<touching color [ red ] ?> to <touching [ (weapon sprite) ] ?>[/blocks] anyway:
[blocks]
<when green flag clicked>
<forever>
<if><touching color[ red ] ?>
<broadcast[ enemy died ]
<end>
<end>


No new stuff for now guys  wink  join me for some Black Ops on xbox: termhn or for some rock band on PS3: rocket232

Offline

 

#8 2008-08-08 22:53:28

joeyman
Scratcher
Registered: 2008-03-28
Posts: 1000+

Re: how do you make a game

You can use variables. Here's the script for the man/thing that loses a life:
[blocks]<when green flag clicked>
<forever if> <touching[ enemy
<change{ lives  }by( -1
<end>
[/blocks]
Then you can get a little more complicated...
Here's the script for ending the game:
[blocks]<when green flag clicked>
<forever if> <( <{ lives  }> <=> 0 )>
<say[ You lose ]for( 2 )secs>
<stop all>
<end>
[/blocks]
Ask me if it's too complicated for you.

Last edited by joeyman (2008-08-08 22:58:14)


Joeyman: On Scratch since March 28, 2008.
Over 142 projects! (And recently a Brony, and PROUD of it!)

Offline

 

Board footer