3 static const int RAYCAST_SOURCES_COUNT = 5;
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 (
GetGame().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 (!
GetGame().IsDedicatedServer())
117 victim.SpawnDamageDealtEffect();
140 obj.ProcessDirectDamage(
DamageType.CLOSE_COMBAT,
this, damageZone,
"BearTrapHit_CarWheel",
"0 0 0", 1);
152 string zoneUsed = damageZone;
153 if (damageZone ==
"zone_leg_random")
155 zoneUsed =
"LeftLeg";
158 zoneUsed =
"RightLeg";
169 obj.ProcessDirectDamage(
DamageType.CLOSE_COMBAT,
this, zoneUsed,
"BearTrapHit",
"0 0 0", 1);
182 player.DamageAllLegs(player.GetMaxHealth() * 2);
186 zombie.SetHealth(
"LeftLeg",
"Health",0.0);
187 zombie.SetHealth(
"RightLeg",
"Health",0.0);
229 super.OnPlacementComplete(player, position, orientation);
248 return "beartrap_deploy_SoundSet";
271 override void GetDebugButtonNames(out
string button1, out
string button2, out
string button3, out
string button4)
273 button1 =
"Activate";
274 button2 =
"Deactivate";
279 switch (button_index)
PlaceObjectActionReciveData ActionReciveData ActionDeployObject()
void AddAction(typename actionName)
DamageType
exposed from C++ (do not change)
override void OnDebugButtonPressServer(int button_index)
override void GetDebugButtonNames(out string button1, out string button2, out string button3, out string button4)
class Hatchback_02_Blue extends Hatchback_02 OnDebugSpawn
string m_AnimationPhaseTriggered
protected const float UPDATE_TIMER_INTERVAL
string m_AnimationPhaseGrounded
protected void Synch(EntityAI victim)
keeping "step" here for consistency only
protected EntityAI GetClosestCarWheel(EntityAI victim)
string m_AnimationPhaseSet
void SetInactive(bool stop_timer=true)
void StartActivate(PlayerBase player)
protected TrapTrigger m_TrapTrigger
class JsonUndergroundAreaTriggerData GetPosition
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)
Wrapper class for managing sound through SEffectManager.
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
float radius
radius along the ray tested
Manager class for managing Effect (EffectParticle, EffectSound)
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.
protected void OnServerSteppedOn(Object obj, string damageZone)
override void OnSteppedOut(EntityAI victim)
override bool CanBeDisarmed()
override void OnUpdate(EntityAI victim)
override string GetLoopDeploySoundset()
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
override void OnPlacementComplete(Man player, vector position="0 0 0", vector orientation="0 0 0")
override void OnSteppedOn(EntityAI victim)
void CauseVictimToStartLimping(Object obj, string damagedZone)
override bool IsDeployable()
override void OnActivate()
void PlaySoundBiteEmpty()
static const int RAYCAST_SOURCES_COUNT
override void SetActions()
static const vector m_RaycastSources[RAYCAST_SOURCES_COUNT]
override void CreateTrigger()
void SetParentObject(TrapBase obj)
void SetExtents(vector mins, vector maxs)
Set the size of the Trigger, avoid using SetCollisionBox directly.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
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].