DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
CABase.c
Go to the documentation of this file.
1class CABase
2{
4 protected float m_LastTick;
5 protected ref Param m_ACData;
7
8 void Init( ActionData action_data )
9 {
11 m_Action = action_data.m_Action;
12 if ( !m_ACData )
13 {
14 m_ACData = new Param;
15 }
17 Setup(action_data);
18 }
19
20 void Setup( ActionData action_data )
21 {
22 }
23
24 int Execute( ActionData action_data )
25 {
26 return UA_ERROR;
27 }
28
29 int Cancel( ActionData action_data )
30 {
31 return UA_CANCEL;
32 }
33
34 int Interrupt( ActionData action_data )
35 {
36 Cancel( action_data );
37 return UA_INTERRUPT;
38 }
39
40 void SetACData(Param units) //overload this method if you want to send more than one parameter out of the action component
41 {
42 if ( m_ACData )
43 {
44 m_ACData = units;
45 }
46 }
47
49 {
50 if ( m_ACData )
51 {
52 return m_ACData;
53 }
54 return NULL;
55 }
56
57 bool IsContinuousAction() //informs command callback whether action is looped or oneshot
58 {
59 return false;
60 }
61
63 {
64 return 0;
65 }
66};
void ActionBase()
Definition ActionBase.c:73
ref ActionBase m_Action
Definition ActionBase.c:27
Definition CABase.c:2
bool IsContinuousAction()
Definition CABase.c:57
protected float m_LastTick
Definition CABase.c:4
Param GetACData()
Definition CABase.c:48
void Setup(ActionData action_data)
Definition CABase.c:20
void SetACData(Param units)
Definition CABase.c:40
int Cancel(ActionData action_data)
Definition CABase.c:29
int Interrupt(ActionData action_data)
Definition CABase.c:34
protected ref Param m_ACData
Definition CABase.c:5
int Execute(ActionData action_data)
Definition CABase.c:24
protected ActionBase m_Action
Definition CABase.c:3
protected ref Param2< float, float > m_ProgressParam
Definition CABase.c:6
void Init(ActionData action_data)
Definition CABase.c:8
float GetProgress()
Definition CABase.c:62
proto int GetTime()
returns mission time in milliseconds
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12
proto native CGame GetGame()
const int UA_ERROR
Definition constants.c:439
const int UA_INTERRUPT
Definition constants.c:422
const int UA_CANCEL
Definition constants.c:421
proto native void Cancel()
cancels action