Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: aussie on Sat 08/01/2005 00:56:06

Title: GetGameScore function? [SOLVED]
Post by: aussie on Sat 08/01/2005 00:56:06
Perhaps a bit of a silly one here.

I'd like the player to get one or another ending depending on the final game score. For instance, if the score is:
$
<50 get the "Total Loser" ending.
50-75 get the "Keep Trying" ending.
75-100 get the "You Champion" ending.

I suppose I need to use the "game.score" global var, which I've found in the manual. However, I'm not sure about how to  enter the statement. Would it be just...

if ((game.score) > 75))

{
//"You Champion"
}

and so forth?

Cheers.
Title: Re: GetGameScore function?
Post by: strazer on Sat 08/01/2005 01:30:46
Yes. :)
Title: Re: GetGameScore function?
Post by: Goot on Sat 08/01/2005 01:35:49
Can't you just do:
if(game.score > 75){
without all the extra parenthisis?
Title: Re: GetGameScore function?
Post by: strazer on Sat 08/01/2005 01:52:08
Yes. ;)
Title: Re: GetGameScore function?
Post by: aussie on Sat 08/01/2005 11:10:36
Thanks a lot, I see I was right to post in the beginners forum.  ;D
Title: Re: GetGameScore function? (SOLVED)
Post by: TerranRich on Mon 10/01/2005 00:51:05
Yes. :=