Author Topic: How to put up a good screen to say "You've won game"?  (Read 5099 times)

0 Members and 1 Guest are viewing this topic.

Offline jtyler125

How to put up a good screen to say "You've won game"?
« on: January 14, 2007, 12:58:57 AM »
Once the person has reached a certain score what alerts them that they have won the game.

I image a statement like:

(if score = 69)
(Print "You've done it you are the winner.")

but I am dumb...what are your suggestions.

My game is 99% done for the competition...just putting in winner script...with your guys help of course.


Life is getting better all the time.
Groundhog Day Competition New Year's Competition

Offline Cloudee1

Re: How to put up a good screen to say "You've won game"?
« Reply #1 on: January 14, 2007, 05:04:19 AM »
Well, it's a common theme right now, but using a doit method you probably could get away a statement like that. Granted the one you typed isn't in the right order but the jist is right. And a display might be better, a print statement will go away if I hit enter, but the display will stick around.

Code: [Select]
(if (== score 69) // I'm not sure what the score variable is called exactly
 (Display "You've done it you are the winner.")
)

Or instead of a print or display, you could just go to an entirely different room. One that says congratulations or you won or whatever. Maybe try your hand at using a changestate method and making some sort of animations. 
« Last Edit: January 14, 2007, 05:07:38 AM by Cloudee1 »
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline jtyler125

Re: How to put up a good screen to say "You've won game"?
« Reply #2 on: January 14, 2007, 08:49:10 AM »
More homework...crap.  I will try it, but I was kind of all giddy being 99% done.  We will see.
Life is getting better all the time.
Groundhog Day Competition New Year's Competition

Offline Doan Sephim

Re: How to put up a good screen to say "You've won game"?
« Reply #3 on: January 14, 2007, 10:58:58 AM »
Hey great job! Can't wait to play the games for the competition.

Offline jtyler125

Re: How to put up a good screen to say "You've won game"?
« Reply #4 on: January 14, 2007, 11:59:32 AM »
Ok does anyone know what the score variable should be if my main.sc is the standard main.sc?  Just trying to add in Cloudee1's code for ending the game once you reach a certain score.

So far I've tried:
the original...
(if (== score 2) // I'm not sure what the score variable is called exactly
 (Display "You've done it you are the winner.")
)

below ar emy variations...
(if (== Score) // I'm not sure what the score variable is called exactly
 (Display "You've done it you are the winner.")
)

(if (== (Score 2) // I'm not sure what the score variable is called exactly
 (Display "You've done it you are the winner.")
)

(if (== (gScore 2) // I'm not sure what the score variable is called exactly
 (Display "You've done it you are the winner.")
)
Life is getting better all the time.
Groundhog Day Competition New Year's Competition

Offline Cloudee1

Re: How to put up a good screen to say "You've won game"?
« Reply #5 on: January 14, 2007, 01:30:47 PM »
gMaxScore
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline jtyler125

Re: How to put up a good screen to say "You've won game"?
« Reply #6 on: January 14, 2007, 08:32:52 PM »
Ok this is what finally worked...and it took hours to get these little lines tweaked out to work...sorry I had to go with the good old print line instead of display.

(if(== gScore 12)
Print ("You've done it you are the winner.")

Thnaks,
Cloudee1
Life is getting better all the time.
Groundhog Day Competition New Year's Competition

Offline Cloudee1

Re: How to put up a good screen to say "You've won game"?
« Reply #7 on: February 14, 2007, 05:36:11 PM »


(if(== gScore 12)

But you see, if 12 is the maximum score. Then when you set it for displaying on the menubar, you actually set the gMaxScore. So your if statement should have been.

(if(== gScore  gMaxScore)

Or even better would be is equal to or greater than, just in case you wanted to add in a couple of hidden points.
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.03 seconds with 23 queries.