DayZ 1.24
Loading...
Searching...
No Matches
tools.c
Go to the documentation of this file.
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,
138 IMMEDIATE,
144 UNIQUE,
145}
146
147enum EScriptInvokerRemoveFlags
148{
149 NONE,
155}
156
160class 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};
IMMEDIATE
It gets added in immediately, which means that when called while an invoker is running,...
Definition tools.c:7
enum EScriptInvokerInsertFlags ScriptCaller()
Designed to hold 1 valid call.
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.
proto bool IsValid()
Checks if the ScriptCaller is valid.
EScriptInvokerInsertFlags
Definition tools.c:130
enum EScriptInvokerInsertFlags ALL
Default flag.
proto bool Equals(notnull ScriptCaller other)
Compares this script caller against another script caller.
UNIQUE
Only one call to this instance+method is ever expected.
Definition tools.c:13
enum EScriptInvokerInsertFlags NONE
Definition tools.c:0
override Widget Init()
Definition DayZGame.c:120
Super root of all classes in Enforce script.
Definition EnScript.c:11
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12
ScriptCallQueue Class provide "lazy" calls - when we don't want to execute function immediately but l...
Definition tools.c:53
proto void Remove(func fn)
remove specific call from queue
proto void CallLaterByName(Class obj, string fnName, int delay=0, bool repeat=false, Param params=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto int GetRemainingTimeByName(Class obj, string fnName)
return Remaining time to the call execution (in miliseconds)
proto int GetRemainingTime(func fn)
return Remaining time to the call execution (in miliseconds)
proto void RemoveByName(Class obj, string fnName)
remove specific call from queue
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)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto void CallByName(Class obj, string fnName, Param params=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto native void Clear()
remove all calls from queue
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)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto native void Tick(float timeslice)
executes calls on queue if their time is already elapsed, if 'repeat = false' call is removed from qu...
ScriptInvoker Class provide list of callbacks usage:
Definition tools.c:116
proto bool Remove(func fn, int flags=EScriptInvokerRemoveFlags.ALL)
remove specific call from list
proto native void Clear()
remove all calls from list
proto int Count(func fn)
count how many times this fn is actively present in the Invoker
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 all inserted methods with given arguments
proto bool Insert(func fn, int flags=EScriptInvokerInsertFlags.IMMEDIATE)
insert method to list
static proto native Shape Create(ShapeType type, int color, ShapeFlags flags, vector p1, vector p2)