disable FloatingHotspot

Started by steptoe, Tue 01/11/2011 21:24:34

Previous topic - Next topic

steptoe

Hi

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

cheers

steptoe



Khris

Create a global bool variable, say floatinghotspot_disabled.

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

Code: ags
  if (floatinghotspot_disabled) return;


Now set the variable to true to disable the module and back to false to enable it again.

monkey0506

#2
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.

steptoe

Cheers Khris

and Monkey, yes...

thanks




SMF spam blocked by CleanTalk