Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
ScriptCallQueue Class Reference

ScriptCallQueue Class provide "lazy" calls - when we don't want to execute function immediately but later during frame update (used mainly in UI)
usage: More...

Detailed Description

ScriptCallQueue Class provide "lazy" calls - when we don't want to execute function immediately but later during frame update (used mainly in UI)
usage:

class Arkanoid extends Game
{
ref ScriptCallQueue m_CallQueue = new ScriptCallQueue();
ScriptCallQueue GetCallQueue() {
return m_CallQueue;
}
override void OnUpdate(float timeslice)
{
m_CallQueue.Tick(timeslice);
...
}
...
}
class MyObject
{
int m_cnt = 0;
void Hello(int p1, string p2)
{
Print("Hello( " + p1 + " , " + p2 + ")");
}
void Test()
{
Print(m_cnt);
m_cnt++;
if (m_cnt > 10)
{
ScriptCallQueue queue = GetGame().GetCallQueue();
queue.Remove(Test);
}
}
}
void Test(MyObject obj)
{
ScriptCallQueue queue = GetGame().GetCallQueue();
queue.CallLater(obj.Hello, 5000, false, 65, "world"); // adds call 'obj.Hello(65, "world")' into queue, and it will be executed once after 5s
queue.CallLater(obj.Test, 3000, true); // adds call 'obj.Test()' into queue, and it will be executed each 3s
queue.Call(obj.Hello, 72, "world 2"); // adds call 'obj.Hello(72, "world 2")' into queue, and it will be executed next frame (on next call of ScriptCallQueue.Tick)
}

Definition at line 52 of file tools.c.


The documentation for this class was generated from the following file:
GetGame
proto native CGame GetGame()
Print
proto void Print(void var)
Prints content of variable to console/log.
OnUpdate
proto native void OnUpdate()
Definition: tools.c:349
Test
< h scale="0.8">< image set="dayz_gui" name="icon_pin"/> Welcome to the DayZ Stress Test Branch</h >< h scale="0.6"> This branch serves for time limited development tests that are open to the community Our goal in each of these tests is to gather performance and stability data from servers under heavy load</h ></br >< h scale="0.8">< image set="dayz_gui" name="icon_pin"/> Stress test Schedule</h >< h scale="0.6"> We ll only run the Stress Tests when our development team needs data and or specific feedback Stress Tests will be announced on our Twitter and and will usually run for a couple of hours</h ></br >< h scale="0.8">< image set="dayz_gui" name="icon_pin"/> Current Stress Test</h >< h scale="0.6"> In the first bunch of Stress we ll mostly focus on watching server performance under heavy PvP gameplay load For detailed information about an ongoing Stress Test(inlcuding known issues)
ScriptCallQueue
ScriptCallQueue Class provide "lazy" calls - when we don't want to execute function immediately but l...
Definition: tools.c:52