GetLocked

From GECK
Jump to: navigation, search


A function included in the GECK for Fallout 3.

Description

The GetLocked script function gets the access state of terminals and locks (Doors or Containers).

Note that in vanilla Fallout 3 and New Vegas, hacking a terminal does not change the access state as far as GetLocked is concerned, and unless unlocked via script, GetLocked will return 1 for any terminal that is or was previously locked (fixed by JIP LN version 54.80 in New Vegas and in GetLockedAlt from ButcherPete FOSE in Fallout 3).

Syntax

[help]
(int) ref.GetLocked

Example

if DoorRef01.GetLocked == 1

Returns whether or not a door is locked but not locked out.

Return Values

  • Doors/Containers:
0	unlocked (player has used a key or door is not locked)
1	locked but can be opened with key or lockpick
2	locked out (lock level is impossible or lock is broken)
  • Terminals:
0	unlocked (player has note, terminal has no lock data, or terminal unlocked through script). Does not change state when hacked(¹).
1	has lock data. Does not change stage when hacked.
2	locked out (player failed at hacking or lock level is impossible) 
  • (¹)As of version 54.80, JIP LN repairs this function so that GetLocked will accurately return the access state of a terminal, as opposed to whether or not it has lock data.

See Also