32 super.EEHealthLevelChanged(oldLevel, newLevel, zone);
45 super.CreateTrigger();
47 vector mins =
"-0.1 -0.05 -0.1";
48 vector maxs =
"0.1 0.4 0.1";
57 if (victim && victim.IsInherited(
CarScript))
69 if (
g_Game.IsServer() && victim)
71 if (!victim.GetAllowDamage())
77 Param1<EntityAI> params =
new Param1<EntityAI>(victim);
86 vector raycastStart = ModelToWorld(raycastSourcePosition);
87 vector raycastEnd =
"0 0.5 0" + raycastStart;
91 rayInput.
type = ObjIntersectFire;
99 if (result.obj && !result.obj.IsDamageDestroyed() && !result.obj.IsAnyInherited({ItemBase, Plant}))
101 OnServerSteppedOn(result.obj, result.obj.GetDamageZoneNameByComponentIndex(result.component));
111 else if (!
g_Game.IsHeadlessOrDedicatedServer())
117 victim.SpawnDamageDealtEffect();
140 obj.ProcessDirectDamage(
DamageType.CLOSE_COMBAT,
this, damageZone,
"BearTrapHit_CarWheel",
"0 0 0", 1);
152 if (obj.IsDamageDestroyed())
155 string zoneUsed = damageZone;
156 if (damageZone ==
"zone_leg_random")
158 zoneUsed =
"LeftLeg";
160 zoneUsed =
"RightLeg";
170 obj.ProcessDirectDamage(
DamageType.CLOSE_COMBAT,
this, zoneUsed,
"BearTrapHit",
"0 0 0", 1);
183 player.DamageAllLegs(player.GetMaxHealth() * 2);
187 zombie.SetHealth(
"LeftLeg",
"Health", 0.0);
188 zombie.SetHealth(
"RightLeg",
"Health", 0.0);
250 return "beartrap_deploy_SoundSet";
283 override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
289 super.GetDebugActions(outputList);
294 if (super.OnAction(action_id, player, ctx))
298 if (action_id ==
EActions.ACTIVATE_ENTITY)
302 else if (action_id ==
EActions.DEACTIVATE_ENTITY)
Param4< int, int, string, int > TSelectableActionInfoWithColor
PlaceObjectActionReciveData ActionReciveData ActionDeployObject()
void AddAction(typename actionName)
override void OnDebugSpawn()
DamageType
exposed from C++ (do not change)
override bool OnAction(int action_id, Man player, ParamsReadContext ctx)
override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
string m_AnimationPhaseTriggered
void Synch(EntityAI victim)
keeping "step" here for consistency only
string m_AnimationPhaseGrounded
const float UPDATE_TIMER_INTERVAL
EntityAI GetClosestCarWheel(EntityAI victim)
string m_AnimationPhaseSet
void SetInactive(bool stop_timer=true)
TrapTrigger m_TrapTrigger
void StartActivate(PlayerBase player)
Super root of all classes in Enforce script.
static proto bool RaycastRVProxy(notnull RaycastRVParams in, out notnull array< ref RaycastRVResult > results, array< Object > excluded=null)
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
Wrapper class for managing sound through SEffectManager.
float radius
radius along the ray tested
static EffectSound PlaySound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
Manager class for managing Effect (EffectParticle, EffectSound)
void OnServerSteppedOn(Object obj, string damageZone)
override void OnSteppedOn(EntityAI victim)
override void CreateTrigger()
override string GetLoopDeploySoundset()
override void OnActivate()
static const vector m_RaycastSources[RAYCAST_SOURCES_COUNT]
void PlaySoundBiteEmpty()
override void OnTriggeredByFallEffectsClient()
override void OnPlacementComplete(Man player, vector position="0 0 0", vector orientation="0 0 0")
override void OnUpdate(EntityAI victim)
override bool CanBeDisarmed()
override bool IsDeployable()
override void SetActions()
void CauseVictimToStartLimping(Object obj, string damagedZone)
static const int RAYCAST_SOURCES_COUNT
override void OnSteppedOut(EntityAI victim)
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
override void OnTriggeredByFall(Contact extra)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Serializer ParamsReadContext
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].
const int SAT_DEBUG_ACTION
vector GetPosition()
Get the world position of the Effect.