View Single Post
Old 06-11-2007, 10:27 PM   #1 (permalink)
Lokai
Forum Expert
 
Lokai's Avatar
 
Join Date: Aug 2003
Location: Bergen, NY (Rochester)
Age: 42
Posts: 1,493
Send a message via ICQ to Lokai Send a message via MSN to Lokai Send a message via Yahoo to Lokai
Lightbulb Light Switch (so simple!)

/************ LightSwitch.cs v.2 **********
*
* (C) 2008, Lokai
*
* Description: (Player) house item that
* will turn on BaseLights which are
* locked down. Switch must be locked
* down to use, also. (GameMaster)
* item that will turn on BaseLights
* anywhere in the world that you have
* linked to the Switch.
* Usage: Use the Connect or Disconnect
* context menu to add or remove lights
* from the group of lights that the
* Switch will control. You can link
* an unlimited number of lights.
*
*******************************************/
Light Switch

What is it?

Uh....it turns on the lights in the house.
Version 2 also lets GMs use it anywhere in the world!

How do you add it?

[add LightSwitch (of course, you can also sell them on vendors, etc.)

Installation:

Place in scripts folder anywhere.

As per what Tru said, if you want this to be accessible to anyone, make this change:

in BaseHouse.cs after this
Code:
 
 
else if ( item is Clock )return true;
add this
Code:
 
 
else if ( item is LightSwitch ) return true;
Technical Mumbo Jumbo:

- It is a Flippable Furniture item, so it can be locked down, and turned to be put facing either direction.
- It will switch up(ON) and down(OFF) when double-clicked.
- It will only operate your lights when it is Locked Down.
- It will turn On and Off EVERY light in your house that is also Locked Down.
- It does not check to see if you own the house. (After all, anyone can flip a switch, right?)

EDIT:

Added new download. Check it out.
Attached Files
File Type: zip LightSwitch.zip (833 Bytes, 225 views)
File Type: zip LightSwitch v2.zip (2.3 KB, 113 views)

Last edited by Lokai; 05-08-2008 at 10:30 AM. Reason: fixed bug in connect method
Lokai is offline   Reply With Quote