Making a Lightswitch?

Post » Sat Jan 23, 2010 12:54 pm

I have no expierience with scripting what so ever and am not entirely expierienced with the GECK at all, but would really like to add multiple lightswitchs to my house in NV.

First of all, how do I create a new script for this lightswitch -that is if I have to, and what would that script say in order for it to work. Also how do I go about linking both the light and the switch.
Please help. :blink:

thanks
User avatar
Lizzie
 
Posts: 3476
Joined: Sun Nov 19, 2006 5:51 am

Post » Sat Jan 23, 2010 7:25 pm

If you want to get into scripting, I recommend you take a look at my http://www.cipscis.com/fallout/tutorials/beginners.aspx tutorial to get you acquainted with the basics.

In order to make a lightswitch, you'll want to use the following:
  • http://geck.gamesas.com/index.php/Reference#Enable_Parent
  • An http://geck.gamesas.com/index.php/OnActivate block
  • http://geck.gamesas.com/index.php/GetDisabled
  • http://geck.gamesas.com/index.php/Enable
  • http://geck.gamesas.com/index.php/Disable

Cipscis
User avatar
carly mcdonough
 
Posts: 3402
Joined: Fri Jul 28, 2006 3:23 am

Post » Sat Jan 23, 2010 8:59 am

Here's how I generally set up a lamp:
scn LampActivatorSCPTRef rLightInt bLightsOnBegin OnReset	If rLight		rLight.Disable		rLight.MarkForDelete ; [s]bloat[/s]		Set rLight to 0	EndIfEndBegin OnActivate	Set bLightsOn to (bLightsOn == 0)	PlaySound ClickSOUN	If bLightsOn		If rLight			rLight.Enable		Else			Set rLight to PlaceAtMe LIGH X Y Z		EndIf	Else		rLight.Disable	EndIfEnd
Nothing needs to be persistent with that setup and one can skip the enable parentage part.
User avatar
Emmie Cate
 
Posts: 3372
Joined: Sun Mar 11, 2007 12:01 am


Return to Fallout: New Vegas