Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
tools.c
Go to the documentation of this file.
1 
53 {
55  proto native void Tick(float timeslice);
57  proto void Call(func fn, void param1 = NULL, void param2 = NULL, void param3 = NULL, void param4 = NULL, void param5 = NULL, void param6 = NULL, void param7 = NULL, void param8 = NULL, void param9 = NULL);
59  proto void CallByName(Class obj, string fnName , Param params = NULL);
61  proto void CallLater(func fn, int delay = 0, bool repeat = false, void param1 = NULL, void param2 = NULL, void param3 = NULL, void param4 = NULL, void param5 = NULL, void param6 = NULL, void param7 = NULL, void param8 = NULL, void param9 = NULL);
63  proto void CallLaterByName(Class obj, string fnName, int delay = 0, bool repeat = false, Param params = NULL);
65  proto void Remove(func fn);
67  proto int GetRemainingTime(func fn);
69  proto void RemoveByName(Class obj, string fnName);
71  proto int GetRemainingTimeByName(Class obj, string fnName);
73  proto native void Clear();
74 };
75 
116 {
118  proto void Invoke(void param1 = NULL, void param2 = NULL, void param3 = NULL, void param4 = NULL, void param5 = NULL, void param6 = NULL, void param7 = NULL, void param8 = NULL, void param9 = NULL);
120  proto bool Insert(func fn, int flags = EScriptInvokerInsertFlags.IMMEDIATE);
122  proto bool Remove(func fn, int flags = EScriptInvokerRemoveFlags.ALL);
124  proto int Count(func fn);
126  proto native void Clear();
127 };
128 
130 {
131  NONE,
144  UNIQUE,
145 }
146 
147 enum EScriptInvokerRemoveFlags
148 {
149  NONE,
154  ALL,
155 }
156 
160 class ScriptCaller
161 {
163  private void ScriptCaller();
165  static proto ScriptCaller Create(func fn);
167  proto void Init(func fn);
169  proto void Invoke(void param1 = null, void param2 = null, void param3 = null, void param4 = null, void param5 = null, void param6 = null, void param7 = null, void param8 = null, void param9 = null);
170 
172  proto bool IsValid();
173 
195 
204 
214  proto bool Equals(notnull ScriptCaller other);
215 
216 };
Invoke
proto void Invoke(void param1=null, void param2=null, void param3=null, void param4=null, void param5=null, void param6=null, void param7=null, void param8=null, void param9=null)
Invoke call on the registered func, throws errors if unsuccessful.
Param
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition: param.c:11
UNIQUE
UNIQUE
Only one call to this instance+method is ever expected.
Definition: tools.c:15
NONE
enum EScriptInvokerInsertFlags NONE
Definition: tools.c:2
ScriptCaller
enum EScriptInvokerInsertFlags ScriptCaller()
Designed to hold 1 valid call.
EScriptInvokerInsertFlags
EScriptInvokerInsertFlags
Definition: tools.c:129
func
Definition: enconvert.c:10
Create
ParticleSource Create(int particle_id, Object parent_obj, vector local_pos="0 0 0", vector local_ori="0 0 0")
Legacy function for backwards compatibility.
Definition: particlemanager.c:174
IsValid
proto bool IsValid()
Checks if the ScriptCaller is valid.
Definition: cfgplayerspawndatajson.c:134
ALL
enum EScriptInvokerInsertFlags ALL
Default flag.
Init
proto void Init(func fn)
Replaces the current registered func with the new one, throws errors if unsuccessful.
Equals
proto bool Equals(notnull ScriptCaller other)
Compares this script caller against another script caller.
IMMEDIATE
IMMEDIATE
It gets added in immediately, which means that when called while an invoker is running,...
Definition: tools.c:9
ScriptCallQueue
ScriptCallQueue Class provide "lazy" calls - when we don't want to execute function immediately but l...
Definition: tools.c:52
Class
Super root of all classes in Enforce script.
Definition: enscript.c:10
ScriptInvoker
ScriptInvoker Class provide list of callbacks usage:
Definition: tools.c:115