Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Mon 09/01/2006 08:59:04

Title: newb hotspot object question (disabling & enabling hotspots)
Post by: on Mon 09/01/2006 08:59:04
Been through the tutorial and have done alot of searching but I cant find
the answers to these questions? Its pretty basic but I'm stuck on it.
I have version 2.7 on XP

I have a hotspot that I want disabled until after I remove a object.
then it enables so it can be used.


Ok in sorry if they are posted somewhere I have been searching for about
2 hours though trying to find the answers.
Thanks
Title: Re: newb hotspot object question
Post by: monkey0506 on Mon 09/01/2006 11:38:57
Hotspot.Enabled (http://www.adventuregamestudio.co.uk/manual/Hotspot.Enabled.htm)

Just use that to disable/enable the hotspot.

Now as for where to put it...that's a different question. :P

You could do something like this (where hMyHotspot is the script o-name of your hotspot):

// Player enters room for first time Interaction
// --> Run Script
hMyhotspot.Enabled = false;

// Object script (wherever you remove the object)
hMyhotspot.Enabled = true;


Just set up a "Run Script" interaction for the "Player enters room for first time" interaction in the Room Interaction Editor, and put the first line of code (hMyhotspot.Enabled = false;) and then at the end of the script (possibly the end of the function) where you remove the object, place the second line of code (hMyhotspot.Enabled = true;).