Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_SetEnableDamageCharacterEditorAttribute.c
Go to the documentation of this file.
3 {
4  override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
5  {
7  if (!editableEntity)
8  return null;
9 
10  //Never set players invincible
11  if (editableEntity.GetPlayerID() > 0)
12  return null;
13 
14  return super.ReadVariable(item, manager);
15  }
16 
17  override void UpdateInterlinkedVariables(SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, bool isInit = false)
18  {
19  if (isInit)
20  {
21  manager.SetAttributeAsSubAttribute(SCR_HealthCharacterEditorAttribute);
22  manager.SetAttributeAsSubAttribute(SCR_BloodEditorAttribute);
23  }
24 
25 
26  bool enabledDamage = var && var.GetBool();
27 
28  manager.SetAttributeEnabled(SCR_HealthCharacterEditorAttribute, enabledDamage);
29  manager.SetAttributeEnabled(SCR_BloodEditorAttribute, enabledDamage);
30  }
31 };
SCR_SetEnableDamageEditorAttribute
Definition: SCR_SetEnableDamageEditorAttribute.c:2
SCR_SetEnableDamageCharacterEditorAttribute
Definition: SCR_SetEnableDamageCharacterEditorAttribute.c:2
SCR_BaseEditorAttributeCustomTitle
Definition: SCR_BaseEditorAttribute.c:868
SCR_BaseEditorAttributeVar
Definition: SCR_BaseEditorAttributeVar.c:1
SCR_BloodEditorAttribute
Definition: SCR_BloodEditorAttribute.c:5
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
SCR_HealthCharacterEditorAttribute
Definition: SCR_HealthCharacterEditorAttribute.c:3
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468