DayZ 1.24
Loading...
Searching...
No Matches
PlateCarrierVest Class Reference
Inheritance diagram for PlateCarrierVest:
[legend]
Collaboration diagram for PlateCarrierVest:
[legend]

Private Member Functions

override void OnWasAttached (EntityAI parent, int slot_id)
 
override void OnDebugSpawn ()
 

Detailed Description

Definition at line 1 of file PlateCarrierVest.c.

Member Function Documentation

◆ OnDebugSpawn()

override void PlateCarrierVest::OnDebugSpawn ( )
inlineprivate

Definition at line 15 of file PlateCarrierVest.c.

16 {
18 if (Class.CastTo(entity, this))
19 {
20 entity.GetInventory().CreateInInventory("PlateCarrierPouches");
21 entity.GetInventory().CreateInInventory("PlateCarrierHolster");
22 }
23 }
Super root of all classes in Enforce script.
Definition EnScript.c:11
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

References Class::CastTo().

◆ OnWasAttached()

override void PlateCarrierVest::OnWasAttached ( EntityAI parent,
int slot_id )
inlineprivate

Definition at line 3 of file PlateCarrierVest.c.

4 {
5 super.OnWasAttached(parent, slot_id);
6
7 if (GetGame().IsServer() && parent.IsInherited(DayZInfected))
8 {
9 float coef = Math.RandomFloatInclusive(0.2, 0.4);
10 SetHealth01("", "", coef);
11 }
12 }
Definition EnMath.c:7
proto native CGame GetGame()
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:106

References GetGame(), and Math::RandomFloatInclusive().


The documentation for this class was generated from the following file: