Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Nethros on Tue 14/12/2004 15:18:45

Title: Need amount of score [SOLVED]
Post by: Nethros on Tue 14/12/2004 15:18:45
Hey. Maybe you know that I am working with a game and use the score as money, but I would want to know how to do so I must have for example 100$ to buy a shirt for. But if the character doesn't have enough money, he says. "Sorry, I cannot afford that." Could anyone help me with this?
Title: Re: Need amount of score
Post by: Ishmael on Tue 14/12/2004 15:35:58
Scripting, and the game.score global variable.

if (game.score < 100) DisplaySpeech(GetPlayerCharacter(), "I cannot affort that.");
else {
Ã,  // purchase code goes here
}

Read the scripting tutorial and other scripting resources in the manual and on the AGS page if you already haven't looked into scripting.
Title: Re: Need amount of score
Post by: strazer on Tue 14/12/2004 15:36:48
And try searching the forum (http://www.adventuregamestudio.co.uk/yabb/index.php?action=search). There have been similiar questions in the past.
Title: Re: Need amount of score
Post by: Nethros on Tue 14/12/2004 17:19:42
Okay. Thanks.
Title: Re: Need amount of score
Post by: TerranRich on Tue 14/12/2004 17:38:01
You should try looking through the scripting begnners' tutorial on the AGS web site. It teaches you about using "if" statements and operators...basic scripting information you'll need if you're going to do much of anything in AGS.