Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
actiontogglenvg.c
Go to the documentation of this file.
2{
3 void ActionToggleNVG()
4 {
5 }
6
7 override bool IsInstant()
8 {
9 return true;
10 }
11
12 override void CreateConditionComponents()
13 {
16 }
17
18 override typename GetInputType()
19 {
21 }
22
23 override bool HasTarget()
24 {
25 return true;
26 }
27
28 override bool UseMainItem()
29 {
30 return false;
31 }
32
33 override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
34 {
35 NVGoggles goggles;
36 Clothing NVmount;
37 NVmount = Clothing.Cast(target.GetObject());
38 if ( !NVmount )
39 return false;
40 goggles = NVGoggles.Cast(NVmount.FindAttachmentBySlotName("NVG"));
41 if ( goggles )
42 return true;
43
44 return false;
45 }
46
47 override void Start( ActionData action_data )
48 {
49 super.Start( action_data );
50
51 NVGoggles goggles;
52 Clothing NVmount;
53
54 NVmount = Clothing.Cast(action_data.m_Target.GetObject());
55 goggles = NVGoggles.Cast(NVmount.FindAttachmentBySlotName("NVG"));
56
57 goggles.RotateGoggles(goggles.m_IsLowered);
58 }
59};
ref CCIBase m_ConditionItem
Definition actionbase.c:64
ref CCTBase m_ConditionTarget
Definition actionbase.c:65
void Start()
Plays all elements this effects consists of.
Definition effect.c:157