Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_PositionEditorAttribute.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_BaseEditorAttributeCustomTitle
()]
2
class
SCR_PositionEditorAttribute
:
SCR_ValidTypeBaseEditorAttribute
3
{
4
override
SCR_BaseEditorAttributeVar
ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
5
{
6
//Disable
7
return
null;
8
9
SCR_EditableEntityComponent
editableEntity =
SCR_EditableEntityComponent
.Cast(item);
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
23
return
SCR_BaseEditorAttributeVar
.
CreateVector
(mat[3]);
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
32
SCR_BaseEditorAttributeVar
snapVar;
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
43
SCR_EditableEntityComponent
editableEntity =
SCR_EditableEntityComponent
.Cast(item);
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
};
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_BaseEditorAttributeCustomTitle
Definition
SCR_BaseEditorAttribute.c:876
SCR_BaseEditorAttributeVar
Definition
SCR_BaseEditorAttributeVar.c:2
SCR_BaseEditorAttributeVar::CreateVector
static SCR_BaseEditorAttributeVar CreateVector(vector value)
Definition
SCR_BaseEditorAttributeVar.c:125
SCR_BaseEditorAttributeVar::GetVector
vector GetVector()
Definition
SCR_BaseEditorAttributeVar.c:74
SCR_EditableEntityComponent
Definition
SCR_EditableEntityComponent.c:14
SCR_EditableEntityComponent::SetTransform
bool SetTransform(vector transform[4], bool changedByUser=false)
Definition
SCR_EditableEntityComponent.c:648
SCR_EditableEntityComponent::GetEntityType
EEditableEntityType GetEntityType(IEntity owner=null)
Definition
SCR_EditableEntityComponent.c:127
SCR_EditableEntityComponent::GetChildrenCount
int GetChildrenCount(bool onlyDirect=false)
Definition
SCR_EditableEntityComponent.c:1251
SCR_EditableEntityComponent::GetTransform
bool GetTransform(out vector outTransform[4])
Definition
SCR_EditableEntityComponent.c:307
SCR_PositionEditorAttribute
Definition
SCR_PositionEditorAttribute.c:3
SCR_SnapYPositionEditorAttribute
Definition
SCR_SnapYPositionEditorAttribute.c:6
SCR_ValidTypeBaseEditorAttribute
Definition
SCR_ValidTypeBaseEditorAttribute.c:4
SCR_ValidTypeBaseEditorAttribute::IsValidEntityType
bool IsValidEntityType(EEditableEntityType entityType)
Definition
SCR_ValidTypeBaseEditorAttribute.c:11
vector
Definition
vector.c:13
scripts
Game
Editor
Containers
Attributes
SCR_PositionEditorAttribute.c
Generated by
1.17.0