Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIMovementSpeedEditorAttribute.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(GetOwner(editableEntity));
24  if (!aiGroup) return null;
25  }
26 
27  //Should get character movement speed
28  return SCR_BaseEditorAttributeVar.CreateInt(1);
29  }
30  override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
31  {
32  //TODO: Implement logics
33  if (!var) return;
34 
35  bool setRunning = (int)m_aValues[var.GetInt()].GetFloatValue();
36 
37  SCR_EditableEntityComponent editableEntity = SCR_EditableEntityComponent.Cast(item);
38 
39  if (editableEntity.GetEntityType() == EEditableEntityType.CHARACTER)
40  {
41  Print("Set Character running: " + setRunning);
42  }
43  else if (editableEntity.GetEntityType() == EEditableEntityType.GROUP)
44  {
45  Print("Set Group running: " + setRunning);
46  }
47  }
48 
49 };
EEditableEntityState
EEditableEntityState
Definition: EEditableEntityState.c:37
m_aValues
SCR_BaseEditorAttributeEntryTimeSlider m_aValues
SCR_AiMovementSpeedEditorAttribute
Definition: SCR_AIMovementSpeedEditorAttribute.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
int
SCR_PossessingManagerComponentClass int
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