Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_RespawnTimeEditorAttribute.c
Go to the documentation of this file.
1
4// Script File
7{
8 override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
9 {
10 //If opened in global attributes
11 if (!IsGameMode(item)) return null;
12
14 if (!gameMode) return null;
15 SCR_RespawnTimerComponent respawnTimeComponent = SCR_RespawnTimerComponent.Cast(gameMode.FindComponent(SCR_RespawnTimerComponent));
16 if (!respawnTimeComponent) return null;
17
18 float value = respawnTimeComponent.GetRespawnTime();
20 }
21
22 override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
23 {
24 if (!var) return;
25
27 if (!gameMode) return;
28 SCR_RespawnTimerComponent respawnTimeComponent = SCR_RespawnTimerComponent.Cast(gameMode.FindComponent(SCR_RespawnTimerComponent));
29 if (!respawnTimeComponent) return;
30 float value = var.GetFloat();
31
32
33 if (value != respawnTimeComponent.GetRespawnTime())
34 {
35 SCR_NotificationsComponent.SendToEveryone(ENotification.EDITOR_ATTRIBUTES_RESPAWN_TIME_CHANGED, playerID, value * 1000);
36 }
37
38 respawnTimeComponent.SetRespawnTime(value);
39 }
40};
ENotification
ArmaReforgerScripted GetGame()
Definition game.c:1398
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
SCR_BaseGameMode GetGameMode()
void SCR_RespawnTimerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
static SCR_BaseEditorAttributeVar CreateFloat(float value)