Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_SpawnPreload.c
Go to the documentation of this file.
1class SCR_SpawnPreload : SimplePreload
2{
3 static const int MAX_DURATION_MS = 10000;
4
5 static SCR_SpawnPreload PreloadSpawnPosition(vector position, float radius = 500)
6 {
7 if (g_Game.BeginPreload(g_Game.GetWorld(), position, radius, MAX_DURATION_MS / 1000))
8 {
9 SCR_SpawnPreload preload = new SCR_SpawnPreload();
10 preload.m_iMaxDuration = MAX_DURATION_MS;
11 preload.m_Position = position;
12
13 return preload;
14 }
15
16 return null;
17 }
18
19 void SCR_SpawnPreload()
20 {
21 Print("SpawnPreload: preload started.", LogLevel.VERBOSE);
22 }
23
24 void ~SCR_SpawnPreload()
25 {
26 Print("SpawnPreload: preload finished (took: " + Math.Round(m_fDuration) + "s).", LogLevel.VERBOSE);
27 }
28};
vector position
Definition Math.c:13
Game g_Game
Game singleton instance.
Definition gameLib.c:13
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14