omega549 Posted March 13, 2011 Share Posted March 13, 2011 This may seem stupid, but ive been trying to figure out how to make a door operate on a switch, ie when the switch is activated the door opens. I cant figure it out, do i need to make a new door and switch and give it a script? or is there something in the edit window that allows me to do it in the render view? Link to comment Share on other sites More sharing options...
davidlallen Posted March 14, 2011 Share Posted March 14, 2011 I seem to recall a tutorial with this exact goal. But the bits of the scripts you need to do this are found here: http://geck.bethsoft.com/index.php/Useful_Scripts Link to comment Share on other sites More sharing options...
b3w4r3 Posted March 14, 2011 Share Posted March 14, 2011 Open the switch properties in the render window and click the enable parent tab. Then select the door for the reference there (door must be persistent). Attach the following script to the door... Begin OnActivate if isactionref player == 1 showmessage SomeMessage ; something like "This door is opened remotely" endif if getopenstate == 3 && isactionref player == 0 setopenstate 1 elseif getopenstate == 1 && isactionref player == 0 setopenstate 0 endif End If you don't want NPCs using the door you can use a ref variable for the GetLinkedRef function and substitute it like this... ref SwitchRef Begin OnActivate if isactionref player == 1 showmessage SomeMessage ; something like "This door is opened remotely" endif set SwitchRef to GetLinkedRef if getopenstate == 3 && Getactionref == SwitchRef setopenstate 1 elseif getopenstate == 1 && Getactionref == SwitchRef setopenstate 0 endif End Link to comment Share on other sites More sharing options...
RealmEleven Posted March 22, 2011 Share Posted March 22, 2011 Provided I have a functioning door and a switch in place, here's what I do: Double-click the switch to open its Reference EditorTick the Persistant Reference checkbox, assign a Reference Editor ID and close the Reference EditorDouble-click the door to open its Reference EditorTick the Persistant Reference checkbox and assign a Reference Editor IDGo to the Activate Parents tabContext-click the Activate Parent Ref list box and select New from the context menuThen just select the switch's Reference Editor ID from a dropdown list or click the button that lets me select the switch in the render window If you tick the Parent Activate Only checkbox, that makes sure the door is only activated by the switch. Note that you can have more than one switch or other activator listed in the Activate Parent Ref list. From here, you can add any script you like to the door (e.g. autoclose, autolock, etc.) without having to readjust what you've done. I hope this helps. Good luck... Link to comment Share on other sites More sharing options...
Recommended Posts