Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_GlobalCharBleedingEditorAttribute.c
Go to the documentation of this file.
3
4{
5 override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
6 {
7 //If opened in global attributes
8
9 BaseGameMode gamemode = BaseGameMode.Cast(item);
10 if (!gamemode)
11 return null;
12
13 SCR_GameModeHealthSettings gameModeHealthSettings = SCR_GameModeHealthSettings.Cast(gamemode.FindComponent(SCR_GameModeHealthSettings));
14 if (!gameModeHealthSettings)
15 return null;
16
17 return SCR_BaseEditorAttributeVar.CreateFloat(gameModeHealthSettings.GetBleedingScale());
18 }
19
20 override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
21 {
22 if (!var)
23 return;
24
25 BaseGameMode gamemode = BaseGameMode.Cast(item);
26 if (!gamemode)
27 return;
28
29 SCR_GameModeHealthSettings gameModeHealthSettings = SCR_GameModeHealthSettings.Cast(gamemode.FindComponent(SCR_GameModeHealthSettings));
30 if (!gameModeHealthSettings)
31 return;
32
33 gameModeHealthSettings.SetBleedingScale(var.GetFloat());
34 }
35};
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
static SCR_BaseEditorAttributeVar CreateFloat(float value)