class TrapBase
TrapBase › ItemBase › InventoryItem › EntityAI › Entity › ObjectTyped › Object › IEntity › Managed
Constructors 1
void TrapBase()Show 19 more
, float.ToString(), m_AddActivationDefect, m_AddDeactivationDefect, m_AnimationPhaseGrounded, m_AnimationPhaseSet, m_AnimationPhaseTriggered, m_DamageOthers, m_DamagePlayers, m_DefectRate, m_InfoActivationTime, m_InfoDamage, m_InfoDamageManipulation, m_InfoDeactivated, m_InfoSetup, m_InitWaitTime, m_IsInProgress, m_NeedActivation, m_UpdateTimer, and m_WasActivatedOrDeactivatedConstants 3
protected const int SPAWN_FLAGS = ECE_CREATEPHYSICSprotected const int DAMAGE_TRIGGER_MINE = 75protected const float UPDATE_TIMER_INTERVAL = 0.05Members 26
float m_InitWaitTimeAfter this time after deployment, the trap is activated
Show 2 more
, TrapBase(), and TripwireTrap.TripwireTrap()bool m_NeedActivationIf activation of trap is needed
float m_DefectRateAdded damage after trap activation
Show 2 more
, TrapBase(), and TripwireTrap.TripwireTrap()float m_DamagePlayersHow much damage player gets when caught
Show 2 more
, TrapBase(), and TripwireTrap.TripwireTrap()float m_DamageOthersHow much damage player gets when caught
bool m_AddDeactivationDefectDamage trap after deactivation
protected bool m_IsActiveTrue means that the trap is ready to detonate
Show 3 more
, OnVariablesSynchronized(), SetActive(), and SetInactive()protected bool m_IsInProgressShow 6 more
, IsTakeable(), OnStoreSave(), OnVariablesSynchronized(), SetActive(), StartActivate(), and TrapBase()protected bool m_Disarmed = falseDEPRECATED Used for explosive traps to prevent detonation after destroying through disarm action
bool m_WasActivatedOrDeactivatedstring m_AnimationPhaseGroundedShow 2 more
, TripwireTrap.FoldTripWire(), and TripwireTrap.TripwireTrap()string m_AnimationPhaseSetShow 2 more
, TripwireTrap.FoldTripWire(), and TripwireTrap.TripwireTrap()string m_AnimationPhaseTriggeredShow 2 more
, TripwireTrap.FoldTripWire(), and TripwireTrap.TripwireTrap()string m_InfoSetupstring m_InfoDeactivatedstring m_InfoDamageManipulationstring m_InfoDamagestring m_InfoActivationTimeprotected ref Timer m_Timerprotected ref Timer m_UpdateTimerprotected TrapTrigger m_TrapTriggerprotected bool m_IsFalling = falseShow 1 more
, OnTriggeredByFall()protected bool m_FallTriggered = falseprotected ref EffectSound m_DeployLoopSoundDEPRECATED
Methods 54
void OnUpdate(EntityAI victim)timer calling OnUpdate in configured interval
TrapTrigger GetTrapTrigger()override void OnVariablesSynchronized()this event is called all variables are synchronized on client
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()Show 3 more
, Object.IsRuined(), m_IsInProgress, and m_NeedActivationbool IsPlaceable()Show 1 more
, IsPlaceable()void Disarm()void SnapOnObject(EntityAI victim)void RemoveFromObject(EntityAI victim)void OnSteppedOn(EntityAI victim)void OnSteppedOut(EntityAI victim)keeping "step" here for consistency only
protected void Synch(EntityAI victim)override void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)Show 3 more
, Serializer.Read(), SnapOnObject(), and Param1.param1void RefreshState()Show 5 more
, OnItemLocationChanged(), SetActive(), SetInactive(), SnapOnObject(), and TripwireTrap.RefreshState()void SetupTrap()Show 2 more
, CGame.IsServer(), and SetupTrapPlayer()void SetupTrapPlayer(PlayerBase player, bool set_position = true)Show 4 more
, Man.LocalDropEntity(), SetActive(), Object.SetPosition(), and m_NeedActivationvoid AddDefect()void SetActive()Show 2 more
, StartActivate(), and TripwireTrap.EEItemLocationChanged()void OnActivate()void StartActivate(PlayerBase player)Show 6 more
, SetActive(), EntityAI.SetSynchDirty(), new Timer(), m_InitWaitTime, m_IsInProgress, and m_Timervoid StartDeactivate(PlayerBase player)void SetInactive(bool stop_timer = true)Show 6 more
, EntityAI.SetSynchDirty(), Timer.Stop(), m_AddDeactivationDefect, m_IsActive, m_Timer, and m_WasActivatedOrDeactivatedvoid CreateTrigger()void DeleteTrigger()void DeferredEnableTrigger()Show 4 more
, CGame.IsServer(), ItemBase.OnItemLocationChanged(), RefreshState(), and SnapOnObject()override void OnPlacementComplete(Man player, vector position = "0 0 0", vector orientation = "0 0 0")Show 3 more
, Object.SetOrientation(), Object.SetPosition(), and EntityAI.SetSynchDirty()bool CanBeClapped()DEPRECATED Set if trap can be disarmed using ActionClapBearTrapWithThisItem
bool CanBeDisarmed()override void SetActions()protected void DamageClothing(PlayerBase player)actual, healthy wheel, let it pass
Show 3 more
, PlayerBase.GetItemOnSlot(), array.Insert(), and m_ClothingDmgoverride void OnItemFallRebuilding()Fires when the (now dynamic) trap actually hits something - the real "it fell" moment.
Show 2 more
, m_IsActive, and m_IsFallingprotected void OnTriggeredByFall(Contact extra)SERVER: decide what "triggered by falling" means for this trap.
Show 2 more
, SetInactive(), and m_IsFallingprotected void ClearIsFalling()protected void OnTriggeredByFallEffectsClient()CLIENT: one-shot visual/audio feedback for the fall-trigger, called via the BoolSignal sync.
void PlayDeployLoopSound()DEPRECATED
void StopDeployLoopSound()DEPRECATED