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_RotationEditorAttribute.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_BaseEditorAttributeCustomTitle
()]
2
class
SCR_RotationEditorAttribute
:
SCR_ValidTypeBaseValueListEditorAttribute
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
vector
angles
=
Math3D
.MatrixToAngles(mat);
23
24
return
SCR_BaseEditorAttributeVar
.
CreateFloat
(
angles
[0] + 180);
25
}
26
27
override
void
WriteVariable(Managed item,
SCR_BaseEditorAttributeVar
var, SCR_AttributesManagerEditorComponent manager,
int
playerID)
28
{
29
if
(!var)
30
return
;
31
32
SCR_EditableEntityComponent
editableEntity =
SCR_EditableEntityComponent
.Cast(item);
33
if
(!editableEntity)
34
return
;
35
36
vector
mat[4];
37
editableEntity.
GetTransform
(mat);
38
vector
angles
=
Math3D
.MatrixToAngles(mat);
39
angles
[0] = var.
GetFloat
() - 180;
40
Math3D
.AnglesToMatrix(
angles
, mat);
41
editableEntity.
SetTransform
(mat,
true
);
42
43
//Print("UPDATE CHILDREN!");
44
}
45
46
override
int
GetEntries(notnull array<ref SCR_BaseEditorAttributeEntry> outEntries)
47
{
48
outEntries.Insert(
new
SCR_BaseEditorAttributeDefaultFloatValue
(180));
49
return
super.GetEntries(outEntries);
50
}
51
};
angles
ref array< string > angles
Definition
PrefabImporter.c:22
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_BaseEditorAttributeDefaultFloatValue
void SCR_BaseEditorAttributeDefaultFloatValue(float floatValue)
Definition
SCR_BaseEditorAttribute.c:863
Math3D
Definition
Math3D.c:13
SCR_BaseEditorAttributeCustomTitle
Definition
SCR_BaseEditorAttribute.c:876
SCR_BaseEditorAttributeVar
Definition
SCR_BaseEditorAttributeVar.c:2
SCR_BaseEditorAttributeVar::GetFloat
float GetFloat()
Definition
SCR_BaseEditorAttributeVar.c:38
SCR_BaseEditorAttributeVar::CreateFloat
static SCR_BaseEditorAttributeVar CreateFloat(float value)
Definition
SCR_BaseEditorAttributeVar.c:113
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_RotationEditorAttribute
Definition
SCR_RotationEditorAttribute.c:3
SCR_ValidTypeBaseValueListEditorAttribute
Definition
SCR_ValidTypeBaseValueListEditorAttribute.c:3
SCR_ValidTypeBaseValueListEditorAttribute::IsValidEntityType
bool IsValidEntityType(EEditableEntityType entityType)
Definition
SCR_ValidTypeBaseValueListEditorAttribute.c:10
vector
Definition
vector.c:13
scripts
Game
Editor
Containers
Attributes
SCR_RotationEditorAttribute.c
Generated by
1.17.0