DayZ 1.24
Loading...
Searching...
No Matches
PluginConfigScene.c
Go to the documentation of this file.
2{
3 protected string FILE_ROOT = "$saves:";
4 protected const string FILE_ROOT_SCENES = "scenes";
5
6 protected const string PARAM_MISSION = "Mission";
7 protected const string PARAM_TIME = "InitTime";
8 protected const string PARAM_YEAR = "InitYear";
9 protected const string PARAM_MONTH = "InitMonth";
10 protected const string PARAM_DAY = "InitDay";
11 protected const string PARAM_HOUR = "InitHour";
12 protected const string PARAM_MINUTE = "InitMinute";
13 protected const string PARAM_OVERCAST = "WeatherInitOvercast";
14 protected const string PARAM_RAIN = "WeatherInitRain";
15 protected const string PARAM_FOG = "WeatherInitFog";
16 protected const string PARAM_WIND_F = "WeatherInitWindForce";
17 protected const string PARAM_PLAYER = "Player";
18 protected const string PARAM_OBJ_COUNT = "SceneObjectsCount";
19 protected const string PARAM_OBJ_NAME = "SceneObject";
20 protected const string PARAM_OBJ_ATT = "Att";
21 protected const string PARAM_OBJ_LNK = "Lnk";
22 protected const string PARAM_OBJ_TYPE = "type";
23 protected const string PARAM_OBJ_POS = "position";
24 protected const string PARAM_OBJ_ROT = "rotation";
25 protected const string PARAM_OBJ_DMG = "damage";
26 protected const string PARAM_OBJ_HLT = "health";
27 protected const string PARAM_OBJ_ISCR = "init_script";
28
30
31 protected string m_FileSceneName;
32
33 //========================================
34 // OnInit
35 //========================================
36 override void OnInit()
37 {
38 //super.OnInit();
39
40 FILE_ROOT = g_Game.GetMissionFolderPath();
41 }
42
43 //========================================
44 // GetPathScenes
45 //========================================
47 {
48 return FILE_ROOT + "\\" + FILE_ROOT_SCENES;
49 }
50
51 //========================================
52 // GetFileName
53 //========================================
54 override string GetFileName()
55 {
56 return GetPathScenes() + "\\" + m_FileSceneName;
57 }
58
59 //========================================
60 // SceneRename
61 //========================================
63 {
64 string file_path = GetPathScenes() + "\\" + scene_name + "." + PluginSceneManager.SCENE_SUFIX;
65 string file_path_new = GetPathScenes() + "\\" + scene_name_new + "." + PluginSceneManager.SCENE_SUFIX;
67 }
68
69 //========================================
70 // SceneDelete
71 //========================================
73 {
74 string file_path = GetPathScenes() + "\\" + scene_name + "." + PluginSceneManager.SCENE_SUFIX;
75 PluginFileHandler.FileDelete(file_path);
76 }
77
78 //========================================
79 // SceneDuplicate
80 //========================================
82 {
83 string file_path = GetPathScenes() + "\\" + scene_name + "." + PluginSceneManager.SCENE_SUFIX;
84 string file_path_new = file_path;
85
86 int i = 0;
88 {
89 file_path_new = GetPathScenes() + "\\" + scene_name + "_copy" + i.ToString() + "." + PluginSceneManager.SCENE_SUFIX;
90 i++;
91 }
92
94 }
95
96 //========================================
97 // GetSceneList
98 //========================================
100 {
101 if (!FileExist(GetPathScenes()))
102 MakeDirectory(GetPathScenes());
103
104 string file_name;
105 int file_attr;
106 int flags;
108
109 string path_find_pattern = GetPathScenes() + "/*." + PluginSceneManager.SCENE_SUFIX; //*/
111
112 bool found = true;
113 while (found)
114 {
115 int pos = file_name.IndexOf(".");
116
117 if (pos > -1)
118 list.Insert(file_name.Substring(0, pos));
119
121 }
122
123 return list;
124 }
125
126 //========================================
127 // EncodeInitScript
128 //========================================
130 {
131 script.Replace("\"", "^");
132 script.Replace("\n", "$");
133 return script;
134 }
135
136 //========================================
137 // DecodeInitScript
138 //========================================
140 {
141 script.Replace("^", "\"");
142 script.Replace("$", "\n");
143 return script;
144 }
145
146 //=====================================================================================
147 //=====================================================================================
148 // SAVE SCENE
149 //=====================================================================================
150 //=====================================================================================
151
152 //========================================
153 // SceneSave
154 //========================================
156 {
157 PluginSceneManager module_scene_editor = PluginSceneManager.Cast(GetPlugin(PluginSceneManager));
158
159 EntityAI player = PluginSceneManager.PLAYER;
160
161 // Log("Saving started....")
162 m_FileSceneName = scene.GetNameScene() + "." + PluginSceneManager.SCENE_SUFIX;
163
164 // Save Settings
165 SaveSceneSettings(scene);
166
167 // Save Weater
168 SaveSceneWeather(scene);
169
170 // Save Players
171 SaveScenePlayer(scene);
172
173 // Save Objects
174 SaveSceneObjects(scene);
175
176 // Save To File
177 SaveConfigToFile();
178 }
179
180
181 //=============================================
182 // SAVE: SaveSceneSettings (Mission Name, Time, Year, Month, Day, Hour, Minute)
183 //=============================================
185 {
186 // Save Mission Name
187 CfgParamString cfg_mission = CfgParamString.Cast(GetParamByName(PARAM_MISSION, CFG_TYPE_STRING));
188 cfg_mission.SetValue(scene.GetNameMission());
189
190 // Save Time
191 CfgParamFloat cfg_time = CfgParamFloat.Cast(GetParamByName(PARAM_TIME, CFG_TYPE_FLOAT));
192 cfg_time.SetValue(scene.GetInitTime());
193
194 // Save Year
195 CfgParamInt cfg_year = CfgParamInt.Cast(GetParamByName(PARAM_YEAR, CFG_TYPE_INT));
196 cfg_year.SetValue(scene.GetInitYear());
197
198 // Save Month
199 CfgParamInt cfg_month = CfgParamInt.Cast(GetParamByName(PARAM_MONTH, CFG_TYPE_INT));
200 cfg_month.SetValue(scene.GetInitMonth());
201
202 // Save Day
203 CfgParamInt cfg_day = CfgParamInt.Cast(GetParamByName(PARAM_DAY, CFG_TYPE_INT));
204 cfg_day.SetValue(scene.GetInitDay());
205
206 // Save Hour
207 CfgParamInt cfg_hour = CfgParamInt.Cast(GetParamByName(PARAM_HOUR, CFG_TYPE_INT));
208 cfg_hour.SetValue(scene.GetInitHour());
209
210 // Save Minute
211 CfgParamInt cfg_minute = CfgParamInt.Cast(GetParamByName(PARAM_MINUTE, CFG_TYPE_INT));
212 cfg_minute.SetValue(scene.GetInitMinute());
213 }
214
215 //=============================================
216 // SAVE: SaveSceneWeather (Overcast, Rain, Fog, Wind Force)
217 //=============================================
219 {
220 // Save Weather Overcast
221 CfgParamFloat cfg_overcast = CfgParamFloat.Cast(GetParamByName(PARAM_OVERCAST, CFG_TYPE_FLOAT));
222 cfg_overcast.SetValue(scene.GetInitOvercast());
223
224 // Save Weather Rain
225 CfgParamFloat cfg_rain = CfgParamFloat.Cast(GetParamByName(PARAM_RAIN, CFG_TYPE_FLOAT));
226 cfg_rain.SetValue(scene.GetInitRain());
227
228 // Save Weather Fog
229 CfgParamFloat cfg_fog = CfgParamFloat.Cast(GetParamByName(PARAM_FOG, CFG_TYPE_FLOAT));
230 cfg_fog.SetValue(scene.GetInitFog());
231
232 // Save Weather Wind Force
233 CfgParamFloat cfg_wind_force = CfgParamFloat.Cast(GetParamByName(PARAM_WIND_F, CFG_TYPE_FLOAT));
234 cfg_wind_force.SetValue(scene.GetInitWindForce());
235 }
236
237 //=============================================
238 // SAVE: SaveScenePlayer (position, rotation, health, script)
239 //=============================================
241 {
242 array<ref ScenePlayer> players = scene.GetScenePlayers();
243
244 if (players.Count() > 0)
245 {
246 ScenePlayer plyr = players.Get(0);
247
248 // Save Player
249 CfgParamArray cfg_param_player = CfgParamArray.Cast(GetParamByName(PARAM_PLAYER, CFG_TYPE_ARRAY));
250
251 // Obj Position
252 CfgParamString cfg_param_player_pos = CfgParamString.Cast(cfg_param_player.GetValueByName(PARAM_OBJ_POS, CFG_TYPE_STRING));
253 cfg_param_player_pos.SetValue(plyr.GetPositionAsString());
254
255 // Obj Rotation
256 CfgParamFloat cfg_param_player_rot = CfgParamFloat.Cast(cfg_param_player.GetValueByName(PARAM_OBJ_ROT, CFG_TYPE_FLOAT));
257 cfg_param_player_rot.SetValue(plyr.GetRotation());
258
259 // Obj Health
260 CfgParamFloat cfg_param_player_hlt = CfgParamFloat.Cast(cfg_param_player.GetValueByName(PARAM_OBJ_HLT, CFG_TYPE_FLOAT));
261 cfg_param_player_hlt.SetValue(plyr.GetHealth());
262
263 // Obj Init Script
264 CfgParamString cfg_param_player_iscr = CfgParamString.Cast(cfg_param_player.GetValueByName(PARAM_OBJ_ISCR, CFG_TYPE_STRING));
265 cfg_param_player_iscr.SetValue(EncodeInitScript(plyr.GetInitScript()));
266 }
267 }
268
269 //=============================================
270 // SAVE: SaveSceneObjects (position, rotation, health, script, scripted links)
271 //=============================================
273 {
274 array<ref SceneObject> objects = scene.GetSceneObjects();
275
276 // Save Objects
277 for (int i = 0; i < objects.Count(); ++i)
278 {
279 SceneObject obj = objects.Get(i);
280
281 string param_name;
282
283 param_name = PARAM_OBJ_NAME + "_" + i.ToString();
284
285 // Save Scene Object
286 CfgParamArray cfg_param_obj = CfgParamArray.Cast(GetParamByName(param_name, CFG_TYPE_ARRAY));
287
288 // Obj Type Name
289 CfgParamString cfg_param_obj_type = CfgParamString.Cast(cfg_param_obj.GetValueByName(PARAM_OBJ_TYPE, CFG_TYPE_STRING));
290 cfg_param_obj_type.SetValue(obj.GetTypeName());
291
292 // Obj Position
293 CfgParamString cfg_param_obj_pos = CfgParamString.Cast(cfg_param_obj.GetValueByName(PARAM_OBJ_POS, CFG_TYPE_STRING));
295
296 // Obj Rotation
297 CfgParamFloat cfg_param_obj_rot = CfgParamFloat.Cast(cfg_param_obj.GetValueByName(PARAM_OBJ_ROT, CFG_TYPE_FLOAT));
298 cfg_param_obj_rot.SetValue(obj.GetRotation());
299
300 // Obj Health
301 CfgParamFloat cfg_param_obj_hlt = CfgParamFloat.Cast(cfg_param_obj.GetValueByName(PARAM_OBJ_HLT, CFG_TYPE_FLOAT));
302 cfg_param_obj_hlt.SetValue(obj.GetHealth());
303
304 // Obj Init Script
305 CfgParamString cfg_param_obj_iscr = CfgParamString.Cast(cfg_param_obj.GetValueByName(PARAM_OBJ_ISCR, CFG_TYPE_STRING));
306 cfg_param_obj_iscr.SetValue(EncodeInitScript(obj.GetInitScript()));
307
308 EntityAI e_obj = obj.GetObject();
309
310 int attcount = e_obj.GetInventory().AttachmentCount();
311
312 if (attcount > 0)
313 {
314 string param_name_att = param_name + "_" + PARAM_OBJ_ATT;
315 CfgParamArray cfg_param_att = CfgParamArray.Cast(GetParamByName(param_name_att, CFG_TYPE_ARRAY));
316 cfg_param_att.Clear();
317
318 for (int att = 0; att < attcount; att++)
319 {
320 EntityAI attachment = e_obj.GetInventory().GetAttachmentFromIndex(att);
321
322 CfgParamString cfg_param_att_str = new CfgParamString("");
323 cfg_param_att_str.SetValue(attachment.GetType());
324 cfg_param_att.InsertValue(cfg_param_att_str);
325 }
326 }
327
329 if (linked_scene_objects.Count() > 0)
330 {
331 string param_name_lnk = param_name + "_" + PARAM_OBJ_LNK;
332 CfgParamArray cfg_param_lnk = CfgParamArray.Cast(GetParamByName(param_name_lnk, CFG_TYPE_ARRAY));
333 cfg_param_lnk.Clear();
334
335 for (int lnk = 0; lnk < linked_scene_objects.Count(); lnk++)
336 {
337 CfgParamInt cfg_param_lnk_int = new CfgParamInt("");
338
339 int index = objects.Find(linked_scene_objects.Get(lnk));
340
341 if (index >= 0)
342 {
343 cfg_param_lnk_int.SetValue(index);
344 cfg_param_lnk.InsertValue(cfg_param_lnk_int);
345 }
346 }
347 }
348 }
349
350 // Save Count Of objects
351 CfgParamInt cfg_obj_count = CfgParamInt.Cast(GetParamByName(PARAM_OBJ_COUNT, CFG_TYPE_INT));
352 cfg_obj_count.SetValue(objects.Count());
353 }
354
355 //=====================================================================================
356 //=====================================================================================
357 // LOAD SCENE
358 //=====================================================================================
359 //=====================================================================================
360
361 //=============================================
362 // LOAD: SceneDataLoad (Settings, Weather, Player, Objects)
363 //=============================================
365 {
366 m_FileSceneName = scene_name + "." + PluginSceneManager.SCENE_SUFIX;
367
368 //PrintString("Loading scene: "+ scene_name);
369
370 LoadConfigFile();
371
372 // Load Scene name
374 scene.SetNameScene(scene_name);
375
376 // Load Scene settings
377 LoadSceneSettings(scene);
378
379 // Load Scene Weather
380 LoadSceneWeather(scene);
381
382 // Load Scene Player
383 LoadScenePlayer(scene);
384
385 // Load Scene Objects
386 LoadSceneObjects(scene);
387
388 if (!FileExist(GetFileName()))
389 SceneDataSave(scene);
390
391 return scene;
392 }
393
394 //=============================================
395 // LOAD: LoadSceneSettings (Mission Name, Time, Year, Month, Day, Hour, Minute)
396 //=============================================
398 {
399 // Load Mission Name
400 CfgParamString cfg_mission = CfgParamString.Cast(GetParamByName(PARAM_MISSION, CFG_TYPE_STRING));
401 scene.SetNameMission(cfg_mission.GetValue());
402
403 // Load Time
404 CfgParamFloat cfg_time = CfgParamFloat.Cast(GetParamByName(PARAM_TIME, CFG_TYPE_FLOAT));
405 scene.SetInitTime(cfg_time.GetValue());
406
407 int year, month, day, hour, minute;
408 GetGame().GetWorld().GetDate(year, month, day, hour, minute);
409
410 // Load Year
411 if (ParamExist(PARAM_YEAR))
412 {
413 CfgParamInt cfg_year = CfgParamInt.Cast(GetParamByName(PARAM_YEAR, CFG_TYPE_INT));
414 scene.SetInitYear(cfg_year.GetValue());
415 }
416 else
417 scene.SetInitYear(year);
418
419 // Load Month
420 if (ParamExist(PARAM_MONTH))
421 {
422 CfgParamInt cfg_month = CfgParamInt.Cast(GetParamByName(PARAM_MONTH, CFG_TYPE_INT));
423 scene.SetInitMonth(cfg_month.GetValue());
424 }
425 else
426 scene.SetInitMonth(month);
427
428 // Load Day
429 if (ParamExist(PARAM_DAY))
430 {
431 CfgParamInt cfg_day = CfgParamInt.Cast(GetParamByName(PARAM_DAY, CFG_TYPE_INT));
432 scene.SetInitDay(cfg_day.GetValue());
433 }
434 else
435 scene.SetInitDay(day);
436
437 // Load Hour
438 if (ParamExist(PARAM_HOUR))
439 {
440 CfgParamInt cfg_hour = CfgParamInt.Cast(GetParamByName(PARAM_HOUR, CFG_TYPE_INT));
441 scene.SetInitHour(cfg_hour.GetValue());
442 }
443 else
444 scene.SetInitHour(hour);
445
446 // Load Minute
447 if (ParamExist(PARAM_MINUTE))
448 {
449 CfgParamInt cfg_minute = CfgParamInt.Cast(GetParamByName(PARAM_MINUTE, CFG_TYPE_INT));
450 scene.SetInitMinute(cfg_minute.GetValue());
451 }
452 else
453 scene.SetInitMinute(minute);
454 }
455
456 //=============================================
457 // LOAD: LoadSceneWeather (Overcast, Rain, Fog, Wind Force)
458 //=============================================
460 {
461 //Load Weather Overcast
462 if (ParamExist(PARAM_OVERCAST))
463 {
464 CfgParamFloat cfg_overcast = CfgParamFloat.Cast(GetParamByName(PARAM_OVERCAST, CFG_TYPE_FLOAT));
465 scene.SetInitOvercast(cfg_overcast.GetValue());
466 }
467
468 //Load Weather Rain
469 if (ParamExist(PARAM_RAIN))
470 {
471 CfgParamFloat cfg_rain = CfgParamFloat.Cast(GetParamByName(PARAM_RAIN, CFG_TYPE_FLOAT));
472 scene.SetInitRain(cfg_rain.GetValue());
473 }
474
475 //Load Weather Fog
476 if (ParamExist(PARAM_FOG))
477 {
478 CfgParamFloat cfg_fog = CfgParamFloat.Cast(GetParamByName(PARAM_FOG, CFG_TYPE_FLOAT));
479 scene.SetInitFog(cfg_fog.GetValue());
480 }
481
482 //Load Weather Wind Force
483 if (ParamExist(PARAM_WIND_F))
484 {
485 CfgParamFloat cfg_wind_force = CfgParamFloat.Cast(GetParamByName(PARAM_WIND_F, CFG_TYPE_FLOAT));
486 scene.SetInitWindForce(cfg_wind_force.GetValue());
487 }
488 }
489
490 //=============================================
491 // LOAD: LoadScenePlayer (position, rotation, health, script)
492 //=============================================
494 {
495 // Only in local game (without server, (GetGame.GetPlayer is null on server! -> by design)
496 if (GetGame().GetPlayer() != NULL)
497 {
498 CfgParamArray cfg_player = CfgParamArray.Cast(GetParamByName(PARAM_PLAYER, CFG_TYPE_ARRAY));
499 CfgParamString cfg_ply_pos = CfgParamString.Cast(cfg_player.GetValueByName(PARAM_OBJ_POS, CFG_TYPE_STRING));
500 CfgParamFloat cfg_ply_rot = CfgParamFloat.Cast(cfg_player.GetValueByName(PARAM_OBJ_ROT, CFG_TYPE_FLOAT));
501 CfgParamFloat cfg_ply_hlt = CfgParamFloat.Cast(cfg_player.GetValueByName(PARAM_OBJ_HLT, CFG_TYPE_FLOAT));
502 CfgParamString cfg_ply_iscr = CfgParamString.Cast(cfg_player.GetValueByName(PARAM_OBJ_ISCR, CFG_TYPE_STRING));
503
504 ScenePlayer scn_player = scene.CreateScenePlayer();
505 scn_player.LinkEntityAI(GetGame().GetPlayer());
506
507 if (PluginSceneManager.GetInstance().GetLoadPlayerPos())
508 {
509 // start scene position
510 vector start_pos = cfg_ply_pos.GetValue().ToVector();
511
512 if (start_pos != vector.Zero)
513 {
514 // Set Position
515 scn_player.SetPosition(cfg_ply_pos.GetValue().ToVector());
516
517 // Set Rotation
518 scn_player.SetRotation(cfg_ply_rot.GetValue());
519 }
520 }
521
522 // Set Health
523 // Health check. Do not spawn player character as dead. He can still be spawned as injured.
524 float health2 = cfg_ply_hlt.GetValue();
525 if (health2 <= 0)
526 health2 = scn_player.GetMaxHealth();
527
528 scn_player.SetHealth(health2);
529
530 // Exe Script
531 scn_player.SetInitScript(DecodeInitScript(cfg_ply_iscr.GetValue()));
532 }
533 //PrintString("LoadScenePlayer.. Finished");
534 }
535
536 //=============================================
537 // LOAD: LoadSceneObjects (position, rotation, health, script, scripted links)
538 //=============================================
540 {
541 CfgParamInt cfg_obj_count = CfgParamInt.Cast(GetParamByName(PARAM_OBJ_COUNT, CFG_TYPE_INT));
542 int obj_count = cfg_obj_count.GetValue();
543
544 for (int i = 0; i < obj_count; ++i)
545 {
546 string param_name = PARAM_OBJ_NAME + "_" + i.ToString();
547
548 // Load scene object name
549 CfgParamArray cfg_obj = CfgParamArray.Cast(GetParamByName(param_name, CFG_TYPE_ARRAY));
550
551 CfgParamString cfg_obj_type = CfgParamString.Cast(cfg_obj.GetValueByName(PARAM_OBJ_TYPE, CFG_TYPE_STRING));
552 CfgParamString cfg_obj_pos = CfgParamString.Cast(cfg_obj.GetValueByName(PARAM_OBJ_POS, CFG_TYPE_STRING));
553 CfgParamFloat cfg_obj_rot = CfgParamFloat.Cast(cfg_obj.GetValueByName(PARAM_OBJ_ROT, CFG_TYPE_FLOAT));
554 CfgParamFloat cfg_obj_hlt = CfgParamFloat.Cast(cfg_obj.GetValueByName(PARAM_OBJ_HLT, CFG_TYPE_FLOAT));
555 CfgParamString cfg_obj_iscr = CfgParamString.Cast(cfg_obj.GetValueByName(PARAM_OBJ_ISCR, CFG_TYPE_STRING));
556
557 //PrintString(itoa(i)+ " Loading param_name: "+ param_name+ " => object type: "+ cfg_obj_type.GetValue());
558
559 // Create Scene Object + position
560 SceneObject scn_obj = scene.CreateSceneObject(cfg_obj_type.GetValue(), cfg_obj_pos.GetValue().ToVector());
561
562 // Setup rotation
563 scn_obj.SetRotation(cfg_obj_rot.GetValue());
564 // Setup health
565 scn_obj.SetHealth(cfg_obj_hlt.GetValue());
566 // Setup init script
567 scn_obj.SetInitScript(DecodeInitScript(cfg_obj_iscr.GetValue()));
568
569 // Setup indices for linked objects
570 CfgParamArray cfg_obj_param_links = CfgParamArray.Cast(GetParamByName(param_name + "_" + PARAM_OBJ_LNK, CFG_TYPE_ARRAY));
572
573 for (int lnko = 0; lnko < cfg_obj_links.Count(); lnko++)
574 {
575 CfgParamInt cfg_obj_param_lnk_int = CfgParamInt.Cast(cfg_obj_links.Get(lnko));
576 scn_obj.m_LinkedSceneObjectsIndices.Insert(cfg_obj_param_lnk_int.GetValue());
577 }
578
579 string param_name_att = param_name + "_" + PARAM_OBJ_ATT;
580
581 if (ParamExist(param_name_att))
582 {
583 CfgParamArray cfg_param_att = CfgParamArray.Cast(GetParamByName(param_name_att, CFG_TYPE_ARRAY));
584
586
587 for (int j = 0; j < cfg_param_attachments.Count(); ++j)
588 {
589 CfgParamString cfg_param_att_str = CfgParamString.Cast(cfg_param_attachments.Get(j));
590 scn_obj.GetObject().GetInventory().CreateAttachment(cfg_param_att_str.GetValue());
591 }
592 }
593 }
594 }
595}
const int CFG_TYPE_ARRAY
Definition CfgParam.c:5
const int CFG_TYPE_INT
Definition CfgParam.c:2
const int CFG_TYPE_STRING
Definition CfgParam.c:1
const int CFG_TYPE_FLOAT
Definition CfgParam.c:3
DayZGame g_Game
Definition DayZGame.c:3528
PlayerBase GetPlayer()
override string GetFileName()
PluginBase GetPlugin(typename plugin_type)
override string GetFileName()
void LoadSceneWeather(SceneData scene)
override void OnInit()
void SceneRename(string scene_name, string scene_name_new)
string EncodeInitScript(string script)
void LoadSceneSettings(SceneData scene)
void SaveSceneWeather(SceneData scene)
TStringArray GetSceneList()
void SceneDelete(string scene_name)
void LoadSceneObjects(SceneData scene)
void SaveScenePlayer(SceneData scene)
SceneData SceneDataLoad(string scene_name)
void SceneDataSave(SceneData scene)
void LoadScenePlayer(SceneData scene)
string DecodeInitScript(string script)
void SceneDuplicate(string scene_name)
void SaveSceneSettings(SceneData scene)
void SaveSceneObjects(SceneData scene)
array< SceneObject > GetLinkedSceneObjects()
float GetHealth()
string GetTypeName()
float GetRotation()
string GetPositionAsString()
string GetInitScript()
Definition SceneObject.c:81
EntityAI GetObject()
Definition SceneObject.c:57
static const vector Zero
Definition EnConvert.c:110
proto native CGame GetGame()
array< string > TStringArray
Definition EnScript.c:666
proto native bool MakeDirectory(string name)
Makes a directory.
enum FindFileFlags FindFile(string pattern, out string fileName, out FileAttr fileAttributes, FindFileFlags flags)
proto bool FindNextFile(FindFileHandle handle, out string fileName, out FileAttr fileAttributes)
proto bool FileExist(string name)
Check existence of file.