Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Mon 31/05/2004 17:17:56

Title: Problem with hotspot.
Post by: on Mon 31/05/2004 17:17:56
I had a basic problem with click on hot spot. I draw a hotspot in a room editor. Then choose interaction and choose any click on hot spot. Then I pick run script, and insert script  "QuitGame(0)". It should close the game while clicking on it. Unfortunatley nothing is happening. I tryed to put there few other scripts but all don,t work. I tryed to cope a scripts from Demo Game but with the samne result. Mybe I am stupid or something is wrong with thet editor. Help, please.
Title: Re: Problem with hotspot.
Post by: SSH on Mon 31/05/2004 17:31:08
How are you testing the game? Are you using the Test game menu option? Do you have debug mode set on?
Title: Re: Problem with hotspot.
Post by: Scorpiorus on Mon 31/05/2004 17:31:53
First of all ensure that the script is attached to the any-click interaction - just open hotspot interaction, choose that already added RunScript option and click the Edit script... button to make it sure the script is there.

Another thing, is that any-click event isn't triggered if the mouse cursor is in walk mode.
Title: Re: Problem with hotspot.
Post by: Barbarian on Mon 31/05/2004 17:38:21
I know this might seem silly to ask, but did you also remember to include the ";" with the command?
Such as "QuitGame(0);"   or alternatively you could have the Quit Dialog box pop up by using:
"QuitGame(1);"