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

#1 2008-10-14 09:00:37

Dalton79
Scratcher
Registered: 2008-10-14
Posts: 16

is it possible....

Im doing a school project in my game design class, we have to make a game.. and i decided to to one of thoes reflex games but like a wild west shooter, i have the first level all set up and when you click "start level one" it switches to you facing the bad guy and at a radom interval a "!" pops up in which you have like .6 seconds to push space. if you push it fast enough then you win! and if you dont well you get shot... got the idea? anyways. my problem is, i need the game to make it so you lose if you press space before the ! appears and for you to automatically lose if your to slow, i have it set up so that all works except, now even if you push it fast enough to win, the game will play the winning animation but once the timer goes over your allowed time .6 seconds... to win it still plays the loseing animation after you win... so is there a way to make the game realise that "once you win, not to play the lose script."

Thank you.

Offline

 

#2 2008-10-14 09:37:53

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: is it possible....

Make a variable called win and set it to 1 when you win. Then make it so that the losing animation cannot play if the win variable is equal to 1.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#3 2008-10-14 10:02:10

Dalton79
Scratcher
Registered: 2008-10-14
Posts: 16

Re: is it possible....

archmage wrote:

Make a variable called win and set it to 1 when you win. Then make it so that the losing animation cannot play if the win variable is equal to 1.

lol i feel dumb... it works, ur the bomb.

Offline

 

#4 2008-10-15 22:04:54

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

Re: is it possible....

hi dlaton79

[url=http://www.mubos-md.com/brawlcards/levelup.php?20417]http://www.mubos-md.com/brawlcards/cards/pxfy4oiu.png
Click here to level up my card![/URL


i like video games and scratch!

Offline

 

Board footer