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

Private Member Functions

void ActionTriggerRemotely ()
 
override void CreateConditionComponents ()
 
override bool HasProgress ()
 
override bool HasTarget ()
 
override bool HasProneException ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnExecuteServer (ActionData action_data)
 

Detailed Description

Definition at line 1 of file ActionTriggerRemotely.c.

Constructor & Destructor Documentation

◆ ActionTriggerRemotely()

void ActionTriggerRemotely::ActionTriggerRemotely ( )
inlineprivate

Definition at line 3 of file ActionTriggerRemotely.c.

4 {
5 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_PRESS_TRIGGER;
6 m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_PRESS_TRIGGER;
7 m_Text = "#STR_Detonate";
8 }
string m_Text
Definition ActionBase.c:49
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

References AnimatedActionBase::m_CommandUID, AnimatedActionBase::m_CommandUIDProne, and m_Text.

Member Function Documentation

◆ ActionCondition()

override bool ActionTriggerRemotely::ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate

Definition at line 31 of file ActionTriggerRemotely.c.

32 {
34 if (rdt && rdt.IsConnected())
35 {
36 ExplosivesBase controlledDevice = ExplosivesBase.Cast(rdt.GetControlledDevice());
37 if (controlledDevice && controlledDevice.GetPairDevice() != item)
38 {
39 rdt.UpdateLED(ERemoteDetonatorLEDState.OFF);
40
41 return false;
42 }
43
44 if (controlledDevice && !controlledDevice.IsRuined() && controlledDevice.GetArmed())
45 {
47 {
48 rdt.UpdateLED(ERemoteDetonatorLEDState.LIT);
49
50 return true;
51 }
52 }
53 }
54
55 rdt.UpdateLED(ERemoteDetonatorLEDState.OFF);
56
57 return false;
58 }
ERemoteDetonatorLEDState
Definition EnMath.c:7
const float EXPLOSIVE_REMOTE_ACTIVATION
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
static proto float SqrFloat(float f)
Returns squared value.

References vector::DistanceSq(), UAMaxDistances::EXPLOSIVE_REMOTE_ACTIVATION, and Math::SqrFloat().

◆ CreateConditionComponents()

override void ActionTriggerRemotely::CreateConditionComponents ( )
inlineprivate

Definition at line 10 of file ActionTriggerRemotely.c.

11 {
14 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56

References m_ConditionItem, and m_ConditionTarget.

◆ HasProgress()

override bool ActionTriggerRemotely::HasProgress ( )
inlineprivate

Definition at line 16 of file ActionTriggerRemotely.c.

17 {
18 return true;
19 }

◆ HasProneException()

override bool ActionTriggerRemotely::HasProneException ( )
inlineprivate

Definition at line 26 of file ActionTriggerRemotely.c.

27 {
28 return true;
29 }

◆ HasTarget()

override bool ActionTriggerRemotely::HasTarget ( )
inlineprivate

Definition at line 21 of file ActionTriggerRemotely.c.

22 {
23 return false;
24 }

◆ OnExecuteServer()

override void ActionTriggerRemotely::OnExecuteServer ( ActionData action_data)
inlineprivate

Definition at line 60 of file ActionTriggerRemotely.c.

61 {
62 super.OnExecuteServer(action_data);
63
65 if (rdt && rdt.IsConnected())
66 {
67 ItemBase controlledDevice = ItemBase.Cast(rdt.GetControlledDevice());
68 if (controlledDevice && !controlledDevice.IsRuined())
69 {
70 controlledDevice.OnActivatedByItem(action_data.m_MainItem);
71 action_data.m_MainItem.SetAnimationPhase("trigger", 1);
72 action_data.m_MainItem.SetAnimationPhase("lever", 1);
73 }
74 }
75 }

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