Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: steptoe on Tue 01/11/2011 21:24:34

Title: disable FloatingHotspot
Post by: steptoe on Tue 01/11/2011 21:24:34
Hi

Does anyone know how to disable FloatingHotspot.scm (downloaded and working) in a room?

cheers

steptoe


Title: Re: disable FloatingHotspot
Post by: Khris on Tue 01/11/2011 22:55:57
Create a global bool variable, say floatinghotspot_disabled.

Then put this as line 111 in the module code (v. 1.1):

  if (floatinghotspot_disabled) return;

Now set the variable to true to disable the module and back to false to enable it again.
Title: Re: disable FloatingHotspot
Post by: monkey0506 on Tue 01/11/2011 23:15:21
I know this isn't the right place for discussing it, but I would just like to pop in a comment that if modules were organized better then we wouldn't have questions like this. I've become an avid fan of ModuleName.Enabled for these type of effects modules (doubly so with the unsupported* usage of an attribute with accessor methods).

*Unsupported, but totally functional in all respects (if implemented properly of course), and inherently required for nearly all of the built-in script structures to function at all.
Title: Re: disable FloatingHotspot
Post by: steptoe on Wed 02/11/2011 10:30:35
Cheers Khris

and Monkey, yes...

thanks