Jump to content

Door Scripts


Ghostballs

Recommended Posts

Im no good at scripting with the language the Geck uses. My question is how to get a door to open from a terminal, and also with the same option selected to open the door, to make alarms go off and to also have klaxon light turn on like in Vault 101, and to turn off...

 

Thanks

-Ghost

Link to comment
Share on other sites

In order to open the door, you'll want to use the SetOpenState function. When it comes to making alarms go off, I recommend having a set of alarm lights and sounds that all have the same enable parent (just use a persistent XMarker for this), so that you can Enable the XMarker when you want your alarm to go off, and Disable it when you want to stop the alarm.

 

If you want some help with Fallout 3's scripting language, have a look at my Scripting for Beginners tutorial.

 

Cipscis

Link to comment
Share on other sites

You do have to write a script in order for this to work. Setting up the XMarker as the enable parent of your lights and sounds only means that you don't have to call Enable and Disable on each reference individually.

 

The terminal doesn't need to be linked to the XMarker in any way. Because it must be a persistent reference in order to be an enable parent, you can give it a unique editorRefID, and refer to it by that in your script. If you want to have several similar setups with different alarm systems, then you would need to make the XMarker the terminal's linked reference so that you can use GetLinkedRef to get its refID.

 

Because you need to open the door as well, and the door will probably be linked with that particular terminal, you'll probably want the door to be the terminal's linked reference. If you still want to have similar alarm/door systems set up elsewhere using copies of the same terminal, then I recommend having the XMarker as the door's linked reference, so that you can use GetLinkedRef again to get the marker's refID.

 

Try something like this to open the door and enable the alarm system with a setup like the one I've described:

ref rDoor
ref rAlarmSystem

set rDoor to GetLinkedRef
set rAlarmSystem to rDoor.GetLinkedRef

rDoor.SetOpenState 1 ; Open
rAlarmSystem.Enable

 

Cipscis

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...