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

Private Member Functions

override void CreateActionComponent ()
 
float ObtainUnrestrainTime ()
 

Private Attributes

const float DEFAULT_UNRESTRAIN_TIME = 2
 

Detailed Description

Definition at line 1 of file ActionUnrestrainTarget.c.

Member Function Documentation

◆ CreateActionComponent()

override void ActionUnrestrainTargetCB::CreateActionComponent ( )
inlineprivate

◆ ObtainUnrestrainTime()

float ActionUnrestrainTargetCB::ObtainUnrestrainTime ( )
inlineprivate

Definition at line 18 of file ActionUnrestrainTarget.c.

19 {
22
23 if (target_player.IsRestrained())
24 {
26
28
30 item_in_hands_target.ConfigGetTextArray("CanBeUnrestrainedBy", CachedObjectsArrays.ARRAY_STRING);
31
33
34 for (int i = 0; i < CachedObjectsArrays.ARRAY_STRING.Count(); i++)
35 {
36 if ((i % 2) == 0)
37 {
39 if (GetGame().IsKindOf(item_in_hands_name, class_name))
40 {
41 float value = CachedObjectsArrays.ARRAY_STRING.Get(i + 1).ToFloat();
42 return value;
43 }
44 }
45 }
46 }
47 return -1;
48 }
class OptionSelectorMultistate extends OptionSelector class_name
ref ActionTarget m_Target
Definition ActionBase.c:32
static ref TStringArray ARRAY_STRING
proto native CGame GetGame()

References CachedObjectsArrays::ARRAY_STRING, class_name, GetGame(), ActionBaseCB::m_ActionData, ActionData::m_Player, and ActionData::m_Target.

Referenced by CreateActionComponent().

Member Data Documentation

◆ DEFAULT_UNRESTRAIN_TIME

const float ActionUnrestrainTargetCB::DEFAULT_UNRESTRAIN_TIME = 2
private

Definition at line 3 of file ActionUnrestrainTarget.c.

Referenced by CreateActionComponent().


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