Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_PositionEditorAttribute.c
Go to the documentation of this file.
3{
4 override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
5 {
6 //Disable
7 return null;
8
10 if (!editableEntity)
11 return null;
12
13 if (!IsValidEntityType(editableEntity.GetEntityType()))
14 return null;
15
16 //~Todo: Make sure chilren positions are set correctly
17 if (editableEntity.GetChildrenCount() > 0)
18 return null;
19
20 vector mat[4];
21 editableEntity.GetTransform(mat);
22
24 }
25
26 override void UpdateInterlinkedVariables(SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, bool isInit = false)
27 {
28 if (!var)
29 return;
30
31 //Set sub labels
33
34 if (isInit && manager.GetAttributeVariable(SCR_SnapYPositionEditorAttribute, snapVar))
35 manager.SetAttributeAsSubAttribute(SCR_SnapYPositionEditorAttribute);
36 }
37
38 override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
39 {
40 if (!var)
41 return;
42
44 if (!editableEntity)
45 return;
46
47 vector mat[4];
48
49 editableEntity.GetTransform(mat);
50 vector value = var.GetVector();
51
52 mat[3] = value;
53 editableEntity.SetTransform(mat, true);
54
55 //Print("UPDATE CHILDREN!");
56 }
57};
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
static SCR_BaseEditorAttributeVar CreateVector(vector value)
bool SetTransform(vector transform[4], bool changedByUser=false)
EEditableEntityType GetEntityType(IEntity owner=null)
int GetChildrenCount(bool onlyDirect=false)
bool GetTransform(out vector outTransform[4])
bool IsValidEntityType(EEditableEntityType entityType)