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

#1 2008-06-08 23:13:05

fredthebed
Scratcher
Registered: 2008-06-08
Posts: 1

how do u make counters and count downs?

lets say u have a fighting game and u wana see how many guys you can kill befor u get killed, so how can i make it count how long i survive and how many guys i get?

Offline

 

#2 2008-06-08 23:19:58

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: how do u make counters and count downs?

Variables.

[blocks]<when green flag clicked>[/blocks]
[blocks]<set{ Time }to( 0[/blocks]
[blocks]<repeat until><( <{ Kills <>> 10 )>[/blocks]
[blocks]<wait( 1 )secsc>[/blocks]
[blocks]<change{ Timer }by( 1[/blocks]
[blocks]<end>[/blocks]
[blocks]<stop script>[/blocks]

And maybe the Kills variable (on enemy scripts):

[blocks]<when green flag clicked>[/blocks]
[blocks]<set{ Kills }to( 0[/blocks]
[blocks]<forever>[/blocks]
[blocks]<if><touching[ Hero[/blocks]
[blocks]<change{ kills }by( 1[/blocks]
[blocks]<hide>[/blocks]
[blocks]<end>[/blocks]


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

Board footer