DayZ Scripts
PC Stable Documentation
 
Loading...
Searching...
No Matches
Building Class Reference

Private Member Functions

proto native int GetLaddersCount ()
 
proto native vector GetLadderPosTop (int ladderIndex)
 
proto native vector GetLadderPosBottom (int ladderIndex)
 
proto native int GetDoorIndex (int componentIndex)
 Gets the index of the door based on the view geometry component index.
 
proto native int GetDoorCount ()
 Returns the number of the doors in the building.
 
proto native bool IsDoorOpen (int index)
 When the door is requested to be fully open (animation wanted phase is greater than 0.5)
 
proto native bool IsDoorOpening (int index)
 When the wanted phase is at the open phase target (1.0)
 
proto native bool IsDoorOpeningAjar (int index)
 When the wanted phase is at the ajar phase target (0.2)
 
proto native bool IsDoorClosing (int index)
 When the wanted phase is at the close phase target (0.0)
 
proto native bool IsDoorOpened (int index)
 When the phase is at the open phase target (1.0)
 
proto native bool IsDoorOpenedAjar (int index)
 When the phase is at the ajar phase target (0.2)
 
proto native bool IsDoorClosed (int index)
 When the phase is at the close phase target (0.0)
 
proto native bool IsDoorLocked (int index)
 When the door is locked.
 
proto native void PlayDoorSound (int index)
 Plays the appropriate sound at the door, based on animation phase and state.
 
proto native void OpenDoor (int index)
 Attempts to open the door.
 
proto native void CloseDoor (int index)
 Attempts to close the door.
 
proto native void LockDoor (int index, bool force=false)
 Locks the door if not already locked, resets the door health. 'force = true' will close the door if open.
 
proto native void UnlockDoor (int index, bool animate=true)
 Unlocks the door if locked, AJAR animation optional.
 
proto native vector GetDoorSoundPos (int index)
 Position in world space for where the door sounds are played from.
 
proto native float GetDoorSoundDistance (int index)
 Audible distance for the door sound.
 
proto native void OutputDoorLog ()
 Requires special build as logging is disabled even on internal builds due to memory usage. Used for checking of possible causes of navmesh desync.
 
int GetNearestDoorBySoundPos (vector position)
 Gets the nearest door based on the sound position (quick and dirty function for debugging)
 
void OnDoorOpenStart (DoorStartParams params)
 Event for when the door starts opening.
 
void OnDoorOpenFinish (DoorFinishParams params)
 Event for when the door finishes opening.
 
void OnDoorOpenAjarStart (DoorStartParams params)
 Event for when the door starts opening ajarred (usually after unlock)
 
void OnDoorOpenAjarFinish (DoorFinishParams params)
 Event for when the door finishes opening ajarred (usually after unlock)
 
void OnDoorCloseStart (DoorStartParams params)
 Event for when the door starts closing.
 
void OnDoorCloseFinish (DoorFinishParams params)
 Event for when the door finishes closing.
 
void OnDoorLocked (DoorLockParams params)
 Event for when the door is locked.
 
void OnDoorUnlocked (DoorLockParams params)
 Event for when the door is unlocked.
 
bool CanDoorBeOpened (int doorIndex, bool checkIfLocked=false)
 
bool CanDoorBeClosed (int doorIndex)
 
bool CanDoorBeLocked (int doorIndex)
 Check if the door is closed and if the door is unlocked.
 
int GetLockCompatibilityType (int doorIdx)
 Which door is compatible with which key (door idx supplied). Bitwise.
 
override void GetDebugActions (out TSelectableActionInfoArrayEx outputList)
 
override bool OnAction (int action_id, Man player, ParamsReadContext ctx)
 
override bool IsBuilding ()
 
override bool CanObstruct ()
 
override bool IsHealthVisible ()
 
void Building ()
 
override bool IsInventoryVisible ()
 
override int GetMeleeTargetType ()
 

Private Attributes

ref TIntArray m_InteractActions
 

Constructor & Destructor Documentation

◆ Building()

void Building ( )
inlineprivate

References g_Game, GetType(), and m_InteractActions.

Member Function Documentation

◆ CanDoorBeClosed()

bool CanDoorBeClosed ( int  doorIndex)
inlineprivate

◆ CanDoorBeLocked()

bool CanDoorBeLocked ( int  doorIndex)
inlineprivate

Check if the door is closed and if the door is unlocked.

References IsDoorLocked(), and IsDoorOpen().

Referenced by ActionLockDoors::ActionCondition().

◆ CanDoorBeOpened()

bool CanDoorBeOpened ( int  doorIndex,
bool  checkIfLocked = false 
)
inlineprivate

◆ CanObstruct()

override bool CanObstruct ( )
inlineprivate

◆ CloseDoor()

◆ GetDebugActions()

override void GetDebugActions ( out TSelectableActionInfoArrayEx  outputList)
inlineprivate

References SAT_DEBUG_ACTION.

◆ GetDoorCount()

proto native int GetDoorCount ( )
private

Returns the number of the doors in the building.

Referenced by Land_WarheadStorage_Bunker_Facility::DeferredInit(), and GetNearestDoorBySoundPos().

◆ GetDoorIndex()

◆ GetDoorSoundDistance()

proto native float GetDoorSoundDistance ( int  index)
private

Audible distance for the door sound.

◆ GetDoorSoundPos()

proto native vector GetDoorSoundPos ( int  index)
private

Position in world space for where the door sounds are played from.

Referenced by GetNearestDoorBySoundPos().

◆ GetLadderPosBottom()

proto native vector GetLadderPosBottom ( int  ladderIndex)
private

◆ GetLadderPosTop()

proto native vector GetLadderPosTop ( int  ladderIndex)
private

◆ GetLaddersCount()

proto native int GetLaddersCount ( )
private

◆ GetLockCompatibilityType()

int GetLockCompatibilityType ( int  doorIdx)
inlineprivate

Which door is compatible with which key (door idx supplied). Bitwise.

Parameters
doorIdx
Returns
bitwise value of all compatible locks
Note
you can combine the bit values like so:
return (1 << EBuildingLockType.LOCKPICK) | (1 << EBuildingLockType.SHIP_CONTAINER_1);
you can also this for each individual door idx

Referenced by ActionLockDoors::ActionCondition(), and ActionUnlockDoors::ActionCondition().

◆ GetMeleeTargetType()

override int GetMeleeTargetType ( )
inlineprivate

◆ GetNearestDoorBySoundPos()

int GetNearestDoorBySoundPos ( vector  position)
inlineprivate

Gets the nearest door based on the sound position (quick and dirty function for debugging)

References vector::DistanceSq(), GetDoorCount(), and GetDoorSoundPos().

Referenced by OnAction().

◆ IsBuilding()

override bool IsBuilding ( )
inlineprivate

◆ IsDoorClosed()

proto native bool IsDoorClosed ( int  index)
private

When the phase is at the close phase target (0.0)

Referenced by Land_WarheadStorage_Bunker_Facility::CanDoorBeOpened(), and Land_WarheadStorage_Main::CanDoorBeOpened().

◆ IsDoorClosing()

proto native bool IsDoorClosing ( int  index)
private

When the wanted phase is at the close phase target (0.0)

◆ IsDoorLocked()

proto native bool IsDoorLocked ( int  index)
private

When the door is locked.

Referenced by ActionUnlockDoors::ActionCondition(), CanDoorBeLocked(), and CanDoorBeOpened().

◆ IsDoorOpen()

proto native bool IsDoorOpen ( int  index)
private

◆ IsDoorOpened()

proto native bool IsDoorOpened ( int  index)
private

When the phase is at the open phase target (1.0)

◆ IsDoorOpenedAjar()

proto native bool IsDoorOpenedAjar ( int  index)
private

When the phase is at the ajar phase target (0.2)

◆ IsDoorOpening()

proto native bool IsDoorOpening ( int  index)
private

When the wanted phase is at the open phase target (1.0)

Referenced by Land_WarheadStorage_Bunker_Facility::CanDoorBeClosed(), and Land_WarheadStorage_Main::CanDoorBeClosed().

◆ IsDoorOpeningAjar()

proto native bool IsDoorOpeningAjar ( int  index)
private

When the wanted phase is at the ajar phase target (0.2)

◆ IsHealthVisible()

override bool IsHealthVisible ( )
inlineprivate

◆ IsInventoryVisible()

override bool IsInventoryVisible ( )
inlineprivate

◆ LockDoor()

proto native void LockDoor ( int  index,
bool  force = false 
)
private

Locks the door if not already locked, resets the door health. 'force = true' will close the door if open.

Referenced by ActionLockDoors::LockDoor(), and OnAction().

◆ OnAction()

◆ OnDoorCloseFinish()

void OnDoorCloseFinish ( DoorFinishParams  params)
inlineprivate

Event for when the door finishes closing.

◆ OnDoorCloseStart()

void OnDoorCloseStart ( DoorStartParams  params)
inlineprivate

Event for when the door starts closing.

◆ OnDoorLocked()

void OnDoorLocked ( DoorLockParams  params)
inlineprivate

Event for when the door is locked.

◆ OnDoorOpenAjarFinish()

void OnDoorOpenAjarFinish ( DoorFinishParams  params)
inlineprivate

Event for when the door finishes opening ajarred (usually after unlock)

◆ OnDoorOpenAjarStart()

void OnDoorOpenAjarStart ( DoorStartParams  params)
inlineprivate

Event for when the door starts opening ajarred (usually after unlock)

◆ OnDoorOpenFinish()

void OnDoorOpenFinish ( DoorFinishParams  params)
inlineprivate

Event for when the door finishes opening.

◆ OnDoorOpenStart()

void OnDoorOpenStart ( DoorStartParams  params)
inlineprivate

Event for when the door starts opening.

◆ OnDoorUnlocked()

void OnDoorUnlocked ( DoorLockParams  params)
inlineprivate

Event for when the door is unlocked.

◆ OpenDoor()

proto native void OpenDoor ( int  index)
private

◆ OutputDoorLog()

proto native void OutputDoorLog ( )
private

Requires special build as logging is disabled even on internal builds due to memory usage. Used for checking of possible causes of navmesh desync.

Referenced by OnAction().

◆ PlayDoorSound()

proto native void PlayDoorSound ( int  index)
private

Plays the appropriate sound at the door, based on animation phase and state.

Referenced by OnAction().

◆ UnlockDoor()

proto native void UnlockDoor ( int  index,
bool  animate = true 
)
private

Unlocks the door if locked, AJAR animation optional.

Referenced by OnAction(), ActionUnlockShippingContainer::UnlockDoor(), and ActionUnlockDoors::UnlockDoor().

Field Documentation

◆ m_InteractActions

ref TIntArray m_InteractActions
private

Referenced by Building().


The documentation for this class was generated from the following file: