Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Nixxon on Fri 18/05/2012 09:30:08

Title: givescore - first time only
Post by: Nixxon on Fri 18/05/2012 09:30:08
A real simple one from a dummy.

The player 'interacts' with a hotspot (which then gives him a score). easy.

However - I only want this to happen the FIRST time the player 'interacts' with the hotspot.

I'd rather not turn the hotspot OFF after it is clicked... as i'd still like to keep the mouse-over ID.


- the script -

function Bush_Interact()
{
CLIF.Walk(760, 460,  eBlock,  eAnywhere);
object[0].Visible = true;
GiveScore(2);

}

Much appreciated :)
Title: Re: givescore - first time only
Post by: Khris on Fri 18/05/2012 10:02:24
http://www.adventuregamestudio.co.uk/manual/Game.DoOnceOnly.htm

In general, things like that are handled using variables.
Title: Re: givescore - first time only
Post by: Nixxon on Sat 19/05/2012 00:27:12
Quote from: Khris on Fri 18/05/2012 10:02:24
http://www.adventuregamestudio.co.uk/manual/Game.DoOnceOnly.htm

In general, things like that are handled using variables.

Badassery, I was looking for that. I rememberd it being (first time only). Thanks again. :)