75 RegisterNetSyncVariableBool(
"m_IsActive");
76 RegisterNetSyncVariableBool(
"m_IsInProgress");
77 RegisterNetSyncVariableBool(
"m_IsSoundSynchRemote");
78 RegisterNetSyncVariableBool(
"m_IsDeploySound");
96 super.OnVariablesSynchronized();
119 super.EEDelete(parent);
139 if (!
super.OnStoreLoad(
ctx, version))
185 if (GetHierarchyRootPlayer() !=
null && GetHierarchyRootPlayer().GetHumanInventory().GetEntityInHands() ==
this)
288 GetGame().RPCSingleParam(
this,
ERPCs.RPC_TRAP_VICTIM,
p,
true);
298 if (!
GetGame().IsDedicatedServer())
302 case ERPCs.RPC_TRAP_VICTIM:
313 case ERPCs.RPC_TRAP_DISARM:
380 if (GetHierarchyRootPlayer() && GetHierarchyRootPlayer().CanDropEntity(
this))
391 player.LocalDropEntity(
this);
436 HideSelection(
"safety_pin");
510 else if (
new_owner.GetHierarchyRootPlayer())
548 if (!
super.CanPutInCargo(parent))
556 if (!
super.CanPutIntoHands(parent))
619 for (
int i = 0;
i <
inv.AttachmentCount();
i++)
ActionActivateTrapCB ActionContinuousBaseCB ActionActivateTrap()
void AddAction(typename actionName)
override void OnVariablesSynchronized()
override void EEItemDetached(EntityAI item, string slot_name)
override void EEItemAttached(EntityAI item, string slot_name)
const int ECE_CREATEPHYSICS
PlayerSpawnPreset slotName
override void EEDelete(EntityAI parent)
void OnRPC(ParamsReadContext ctx)
override bool CanPutInCargo(EntityAI parent)
override bool CanPutIntoHands(EntityAI parent)
override bool IsTakeable()
override bool CanRemoveFromHands(EntityAI parent)
bool CanPlayDeployLoopSound()
override void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
void OnStoreSave(ParamsWriteContext ctx)
bool OnStoreLoad(ParamsReadContext ctx, int version)
string m_AnimationPhaseTriggered
void DeferredEnableTrigger()
string m_InfoDamageManipulation
bool m_WasActivatedOrDeactivated
DEPRECATED Used for explosive traps to prevent detonation after destroying through disarm action.
ref array< int > m_ClothingDmg
TrapTrigger GetTrapTrigger()
enum SoundTypeTrap SPAWN_FLAGS
void PlayDeployLoopSound()
void StopDeployLoopSound()
void Synch(EntityAI victim)
keeping "step" here for consistency only
string m_AnimationPhaseGrounded
const float UPDATE_TIMER_INTERVAL
override bool CanBePlaced(Man player, vector position)
void RemoveFromObject(EntityAI victim)
ref EffectSound m_DeployLoopSound
const int DAMAGE_TRIGGER_MINE
EntityAI GetClosestCarWheel(EntityAI victim)
string m_InfoActivationTime
string m_AnimationPhaseSet
void SnapOnObject(EntityAI victim)
void SetInactive(bool stop_timer=true)
void DamageClothing(PlayerBase player)
bool CanBeClapped()
DEPRECATED Set if trap can be disarmed using ActionClapBearTrapWithThisItem.
TrapTrigger m_TrapTrigger
void SetupTrapPlayer(PlayerBase player, bool set_position=true)
void SetDisarmed(bool disarmed)
DEPRECATED.
bool GetDisarmed()
DEPRECATED.
bool IsPlaceableAtPosition(vector position)
void StartActivate(PlayerBase player)
bool m_AddActivationDefect
bool m_AddDeactivationDefect
void StartDeactivate(PlayerBase player)
class JsonUndergroundAreaTriggerData GetPosition
Super root of all classes in Enforce script.
do not process rotations !
Wrapper class for managing sound through SEffectManager.
script counterpart to engine's class Inventory
The class that will be instanced (moddable)
Manager class for managing Effect (EffectParticle, EffectSound)
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Serialization general interface. Serializer API works with:
override void OnSteppedOn(EntityAI victim)
override void CreateTrigger()
override void OnActivate()
override void OnPlacementComplete(Man player, vector position="0 0 0", vector orientation="0 0 0")
override bool CanBeDisarmed()
override void SetActions()
override void OnSteppedOut(EntityAI victim)
void SetEnabled()
prevents insider adding in the wrong position, HOTFIX
void SetParentObject(TrapBase obj)
void SetExtents(vector mins, vector maxs)
Set the size of the Trigger, avoid using SetCollisionBox directly.
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
proto native CGame GetGame()
proto native void SetPosition(vector position)
Set the world position of the Effect.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto float SqrFloat(float f)
Returns squared value.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.