Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIStanceEditorAttribute.c
Go to the documentation of this file.
3 {
4  override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
5  {
7  if (!editableEntity || (editableEntity.GetEntityType() != EEditableEntityType.CHARACTER && editableEntity.GetEntityType() != EEditableEntityType.GROUP)) return null;
8  if (editableEntity.HasEntityState(EEditableEntityState.PLAYER)) return null;
9 
10  //WIP
11  #ifndef WORKBENCH
12  return null;
13  #endif
14 
15  //If character
16  if (editableEntity.GetEntityType() == EEditableEntityType.CHARACTER)
17  {
18 
19  }
20  //If group
21  else
22  {
23  SCR_AIGroup aiGroup = SCR_AIGroup.Cast(editableEntity.GetOwner());
24  if (!aiGroup) return null;
25  }
26 
27  //Should get character Stance
28  return SCR_BaseEditorAttributeVar.CreateInt(0);
29  }
30  override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
31  {
32  SCR_EditableEntityComponent editableEntity = SCR_EditableEntityComponent.Cast(item);
33 
34  //TODO: Implement logics
35  if (!var) return;
36 
37  if (editableEntity.GetEntityType() == EEditableEntityType.CHARACTER)
38  {
39  Print("Set Character stance to: " + m_aValues[var.GetInt()].GetName());
40  }
41  else if (editableEntity.GetEntityType() == EEditableEntityType.GROUP)
42  {
43  Print("Set Group stance to: " + m_aValues[var.GetInt()].GetName());
44  }
45  }
46 };
EEditableEntityState
EEditableEntityState
Definition: EEditableEntityState.c:37
m_aValues
SCR_BaseEditorAttributeEntryTimeSlider m_aValues
SCR_AiStanceEditorAttribute
Definition: SCR_AIStanceEditorAttribute.c:2
SCR_BaseEditorAttributeCustomTitle
Definition: SCR_BaseEditorAttribute.c:868
SCR_BaseEditorAttributeVar
Definition: SCR_BaseEditorAttributeVar.c:1
EEditableEntityType
EEditableEntityType
Defines type of SCR_EditableEntityComponent. Assigned automatically based on IEntity inheritance.
Definition: EEditableEntityType.c:5
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
SCR_AIGroup
Definition: SCR_AIGroup.c:68
SCR_BaseFloatValueHolderEditorAttribute
Attribute base for Name, icon and float value for other attributes to inherent from.
Definition: SCR_BaseFloatValueHolderEditorAttribute.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