Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
trapbase.c File Reference

Go to the source code of this file.

Enumerations

enum  SoundTypeTrap { ACTIVATING = 5 }
 

Functions

void TrapBase ()
 
void ~TrapBase ()
 
void OnUpdate (EntityAI victim)
 
TrapTrigger GetTrapTrigger ()
 
override void OnVariablesSynchronized ()
 this event is called all variables are synchronized on client More...
 
override void EEDelete (EntityAI parent)
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
bool IsActive ()
 
bool IsInactive ()
 
override bool IsTakeable ()
 
bool IsActivable ()
 
bool IsPlaceable ()
 
bool IsPlaceableAtPosition (vector position)
 
void Disarm ()
 
void OnDisarm ()
 also called from RPC on client More...
 
void SnapOnObject (EntityAI victim)
 
void RemoveFromObject (EntityAI victim)
 
void OnSteppedOn (EntityAI victim)
 
void OnSteppedOut (EntityAI victim)
 
protected void Synch (EntityAI victim)
 keeping "step" here for consistency only More...
 
override void OnRPC (PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
 
void RefreshState ()
 
void SetupTrap ()
 
void SetupTrapPlayer (PlayerBase player, bool set_position=true)
 
void AddDefect ()
 
void SetActive ()
 
void OnActivate ()
 HumanCommandScript fully scriptable command. More...
 
void StartActivate (PlayerBase player)
 
void StartDeactivate (PlayerBase player)
 
void SetInactive (bool stop_timer=true)
 
void CreateTrigger ()
 
void DeleteTrigger ()
 
void DeferredEnableTrigger ()
 
override void OnItemLocationChanged (EntityAI old_owner, EntityAI new_owner)
 
override void EEItemAttached (EntityAI item, string slot_name)
 
override void EEItemDetached (EntityAI item, string slot_name)
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
override bool CanPutInCargo (EntityAI parent)
 
override bool CanPutIntoHands (EntityAI parent)
 
override bool CanRemoveFromHands (EntityAI parent)
 
override bool CanBePlaced (Man player, vector position)
 
bool CanBeClapped ()
 DEPRECATED Set if trap can be disarmed using ActionClapBearTrapWithThisItem. More...
 
bool CanBeDisarmed ()
 
void SetDisarmed (bool disarmed)
 DEPRECATED. More...
 
bool GetDisarmed ()
 DEPRECATED. More...
 
void PlayDeployLoopSound ()
 
void StopDeployLoopSound ()
 
override void SetActions ()
 
protected EntityAI GetClosestCarWheel (EntityAI victim)
 
protected void DamageClothing (PlayerBase player)
 

Variables

enum SoundTypeTrap SPAWN_FLAGS = ECE_LOCAL
 
const protected int DAMAGE_TRIGGER_MINE = 75
 
const protected float UPDATE_TIMER_INTERVAL = 0.05
 
float m_InitWaitTime
 
bool m_NeedActivation
 
float m_DefectRate
 
float m_DamagePlayers
 
float m_DamageOthers
 
bool m_AddActivationDefect
 
bool m_AddDeactivationDefect
 
protected bool m_IsActive
 
protected bool m_IsInProgress
 
protected bool m_Disarmed = false
 
bool m_WasActivatedOrDeactivated
 DEPRECATED Used for explosive traps to prevent detonation after destroying through disarm action. More...
 
string m_AnimationPhaseGrounded
 
string m_AnimationPhaseSet
 
string m_AnimationPhaseTriggered
 
string m_InfoSetup
 
string m_InfoDeactivated
 
string m_InfoDamageManipulation
 
string m_InfoDamage
 
string m_InfoActivationTime
 
protected ref Timer m_Timer
 
protected ref Timer m_UpdateTimer
 
protected TrapTrigger m_TrapTrigger
 
protected ref array< intm_ClothingDmg
 
protected ref EffectSound m_DeployLoopSound
 

Enumeration Type Documentation

◆ SoundTypeTrap

Enumerator
ACTIVATING 

Definition at line 1 of file trapbase.c.

Function Documentation

◆ AddDefect()

void AddDefect ( )

Definition at line 429 of file trapbase.c.

◆ CanBeClapped()

bool CanBeClapped ( )

DEPRECATED Set if trap can be disarmed using ActionClapBearTrapWithThisItem.

Definition at line 611 of file trapbase.c.

◆ CanBeDisarmed()

bool CanBeDisarmed ( )

Definition at line 617 of file trapbase.c.

◆ CanBePlaced()

override bool CanBePlaced ( Man  player,
vector  position 
)

Definition at line 605 of file trapbase.c.

◆ CanPutInCargo()

override bool CanPutInCargo ( EntityAI  parent)

Definition at line 580 of file trapbase.c.

◆ CanPutIntoHands()

override bool CanPutIntoHands ( EntityAI  parent)

Definition at line 590 of file trapbase.c.

◆ CanRemoveFromHands()

override bool CanRemoveFromHands ( EntityAI  parent)

Definition at line 600 of file trapbase.c.

◆ CreateTrigger()

void CreateTrigger ( )

Definition at line 498 of file trapbase.c.

◆ DamageClothing()

protected void DamageClothing ( PlayerBase  player)

Definition at line 691 of file trapbase.c.

◆ DeferredEnableTrigger()

void DeferredEnableTrigger ( )

Definition at line 520 of file trapbase.c.

◆ DeleteTrigger()

void DeleteTrigger ( )

Definition at line 511 of file trapbase.c.

◆ Disarm()

void Disarm ( )

Definition at line 221 of file trapbase.c.

◆ EEDelete()

override void EEDelete ( EntityAI  parent)

Definition at line 117 of file trapbase.c.

◆ EEItemAttached()

override void EEItemAttached ( EntityAI  item,
string  slot_name 
)

Definition at line 551 of file trapbase.c.

◆ EEItemDetached()

override void EEItemDetached ( EntityAI  item,
string  slot_name 
)

Definition at line 559 of file trapbase.c.

◆ GetClosestCarWheel()

protected EntityAI GetClosestCarWheel ( EntityAI  victim)

carscript specific handling (not all traps are uses this)

ruined wheel, bail out

ignore all spare wheel

actual, healthy wheel, let it pass

Definition at line 650 of file trapbase.c.

◆ GetDisarmed()

bool GetDisarmed ( )

DEPRECATED.

Definition at line 629 of file trapbase.c.

◆ GetTrapTrigger()

TrapTrigger GetTrapTrigger ( )

Definition at line 88 of file trapbase.c.

◆ IsActivable()

bool IsActivable ( )

Definition at line 184 of file trapbase.c.

◆ IsActive()

bool IsActive ( )

Definition at line 163 of file trapbase.c.

◆ IsInactive()

bool IsInactive ( )

Definition at line 168 of file trapbase.c.

◆ IsPlaceable()

bool IsPlaceable ( )

Definition at line 189 of file trapbase.c.

◆ IsPlaceableAtPosition()

bool IsPlaceableAtPosition ( vector  position)

Definition at line 207 of file trapbase.c.

◆ IsTakeable()

override bool IsTakeable ( )

Definition at line 174 of file trapbase.c.

◆ OnActivate()

void OnActivate ( )

HumanCommandScript fully scriptable command.

Warning
NON-MANAGED, will be managed by C++ once it is sent to the CommandHandler through Human.StartCommand_Script
Note
So ideally, it is best to set up the HumanCommandScript, not create any instances and start it through Human.StartCommand_ScriptInst In case an instance needs to be created, it needs manual deletion if not sent to the CommandHandler But deleting it while it is in the CommandHandler will cause crashes constructor must have 1st parameter to be Human virtual to be overridden called when command starts

Definition at line 1180 of file human.c.

◆ OnDisarm()

void OnDisarm ( )

also called from RPC on client

◆ OnItemLocationChanged()

override void OnItemLocationChanged ( EntityAI  old_owner,
EntityAI  new_owner 
)

Definition at line 526 of file trapbase.c.

◆ OnPlacementComplete()

override void OnPlacementComplete ( Man  player,
vector  position = "0 0 0",
vector  orientation = "0 0 0" 
)

Definition at line 567 of file trapbase.c.

◆ OnRPC()

override void OnRPC ( PlayerIdentity  sender,
int  rpc_type,
ParamsReadContext  ctx 
)

Definition at line 312 of file trapbase.c.

◆ OnSteppedOn()

void OnSteppedOn ( EntityAI  victim)

Definition at line 290 of file trapbase.c.

◆ OnSteppedOut()

void OnSteppedOut ( EntityAI  victim)

Definition at line 166 of file trap_landmine.c.

◆ OnStoreLoad()

override bool OnStoreLoad ( ParamsReadContext  ctx,
int  version 
)

Definition at line 137 of file trapbase.c.

◆ OnStoreSave()

override void OnStoreSave ( ParamsWriteContext  ctx)

Definition at line 128 of file trapbase.c.

◆ OnUpdate()

void OnUpdate ( EntityAI  victim)

Definition at line 89 of file trap_landmine.c.

◆ OnVariablesSynchronized()

override void OnVariablesSynchronized ( )

this event is called all variables are synchronized on client

Definition at line 94 of file trapbase.c.

◆ PlayDeployLoopSound()

void PlayDeployLoopSound ( )

◆ RefreshState()

void RefreshState ( )

Definition at line 354 of file trapbase.c.

◆ RemoveFromObject()

void RemoveFromObject ( EntityAI  victim)

Definition at line 285 of file trapbase.c.

◆ SetActions()

override void SetActions ( )

Definition at line 642 of file trapbase.c.

◆ SetActive()

void SetActive ( )

Definition at line 437 of file trapbase.c.

◆ SetDisarmed()

void SetDisarmed ( bool  disarmed)

DEPRECATED.

Definition at line 623 of file trapbase.c.

◆ SetInactive()

void SetInactive ( bool  stop_timer = true)

Definition at line 482 of file trapbase.c.

◆ SetupTrap()

void SetupTrap ( )

Definition at line 402 of file trapbase.c.

◆ SetupTrapPlayer()

void SetupTrapPlayer ( PlayerBase  player,
bool  set_position = true 
)

Definition at line 411 of file trapbase.c.

◆ SnapOnObject()

void SnapOnObject ( EntityAI  victim)

Definition at line 233 of file trapbase.c.

◆ StartActivate()

void StartActivate ( PlayerBase  player)

Definition at line 461 of file trapbase.c.

◆ StartDeactivate()

void StartDeactivate ( PlayerBase  player)

Definition at line 218 of file trap_tripwire.c.

◆ StopDeployLoopSound()

void StopDeployLoopSound ( )

◆ Synch()

protected void Synch ( EntityAI  victim)

keeping "step" here for consistency only

Definition at line 298 of file trapbase.c.

◆ TrapBase()

void TrapBase ( )

timer calling OnUpdate in configured interval

Definition at line 49 of file trapbase.c.

◆ ~TrapBase()

void ~TrapBase ( )

Definition at line 81 of file trapbase.c.

Variable Documentation

◆ DAMAGE_TRIGGER_MINE

const protected int DAMAGE_TRIGGER_MINE = 75

Definition at line 14 of file trapbase.c.

◆ m_AddActivationDefect

bool m_AddActivationDefect

Definition at line 23 of file trapbase.c.

◆ m_AddDeactivationDefect

bool m_AddDeactivationDefect

Definition at line 24 of file trapbase.c.

◆ m_AnimationPhaseGrounded

string m_AnimationPhaseGrounded

Definition at line 32 of file trapbase.c.

◆ m_AnimationPhaseSet

string m_AnimationPhaseSet

Definition at line 33 of file trapbase.c.

◆ m_AnimationPhaseTriggered

string m_AnimationPhaseTriggered

Definition at line 34 of file trapbase.c.

◆ m_ClothingDmg

protected ref array<int> m_ClothingDmg

Definition at line 46 of file trapbase.c.

◆ m_DamageOthers

float m_DamageOthers

Definition at line 21 of file trapbase.c.

◆ m_DamagePlayers

float m_DamagePlayers

Definition at line 20 of file trapbase.c.

◆ m_DefectRate

float m_DefectRate

Definition at line 19 of file trapbase.c.

◆ m_DeployLoopSound

protected ref EffectSound m_DeployLoopSound

Definition at line 47 of file trapbase.c.

◆ m_Disarmed

protected bool m_Disarmed = false

Definition at line 28 of file trapbase.c.

◆ m_InfoActivationTime

string m_InfoActivationTime

Definition at line 40 of file trapbase.c.

◆ m_InfoDamage

string m_InfoDamage

Definition at line 39 of file trapbase.c.

◆ m_InfoDamageManipulation

string m_InfoDamageManipulation

Definition at line 38 of file trapbase.c.

◆ m_InfoDeactivated

string m_InfoDeactivated

Definition at line 37 of file trapbase.c.

◆ m_InfoSetup

string m_InfoSetup

Definition at line 36 of file trapbase.c.

◆ m_InitWaitTime

float m_InitWaitTime

Definition at line 17 of file trapbase.c.

◆ m_IsActive

protected bool m_IsActive

Definition at line 25 of file trapbase.c.

◆ m_IsInProgress

protected bool m_IsInProgress

Definition at line 26 of file trapbase.c.

◆ m_NeedActivation

bool m_NeedActivation

Definition at line 18 of file trapbase.c.

◆ m_Timer

protected ref Timer m_Timer

Definition at line 42 of file trapbase.c.

◆ m_TrapTrigger

protected TrapTrigger m_TrapTrigger

Definition at line 44 of file trapbase.c.

◆ m_UpdateTimer

protected ref Timer m_UpdateTimer

Definition at line 43 of file trapbase.c.

◆ m_WasActivatedOrDeactivated

bool m_WasActivatedOrDeactivated

DEPRECATED Used for explosive traps to prevent detonation after destroying through disarm action.

Definition at line 30 of file trapbase.c.

◆ SPAWN_FLAGS

enum SoundTypeTrap SPAWN_FLAGS = ECE_LOCAL

◆ UPDATE_TIMER_INTERVAL

const protected float UPDATE_TIMER_INTERVAL = 0.05

Definition at line 15 of file trapbase.c.