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_ScenarioFrameworkActionSetEntityTransformation.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_ContainerActionTitle
()]
2
class
SCR_ScenarioFrameworkActionSetEntityTransformation
:
SCR_ScenarioFrameworkActionBase
3
{
4
[
Attribute
(
desc
:
"Entity to change (Optional if action is attached on Slot that spawns target entity)"
)]
5
ref
SCR_ScenarioFrameworkGet
m_EntityGetter;
6
7
[
Attribute
(
desc
:
"Name of the entity, which transformation will be used)"
)]
8
ref
SCR_ScenarioFrameworkGet
m_TransformationEntityGetter;
9
10
[
Attribute
(
desc
:
"X rotation (Optional)"
)]
11
vector
m_vRotationX;
12
13
[
Attribute
(
desc
:
"Y rotation (Optional)"
)]
14
vector
m_vRotationY;
15
16
[
Attribute
(
desc
:
"Y rotation (Optional)"
)]
17
vector
m_vRotationZ;
18
19
[
Attribute
(
desc
:
"Translation (Optional)"
)]
20
vector
m_vTranslation;
21
22
//------------------------------------------------------------------------------------------------
23
override
void
OnActivate
(
IEntity
object
)
24
{
25
if
(!CanActivate())
26
return
;
27
28
IEntity
entity;
29
if
(!ValidateInputEntity(
object
, m_EntityGetter, entity))
30
return
;
31
32
vector
transformation[4];
33
34
if
(m_TransformationEntityGetter)
35
{
36
SCR_ScenarioFrameworkParam<IEntity> transformationEntityWrapper = SCR_ScenarioFrameworkParam<IEntity>.Cast(m_TransformationEntityGetter.Get());
37
if
(!transformationEntityWrapper)
38
{
39
Print
(
string
.Format(
"ScenarioFramework Action: Transformation Entity Getter has issues for action %1. Action won't do anything."
,
this
),
LogLevel
.ERROR);
40
return
;
41
}
42
43
IEntity
transformationEntity = transformationEntityWrapper.GetValue();
44
if
(!transformationEntity)
45
{
46
Print
(
string
.Format(
"ScenarioFramework Action: Transformation Entity could not be found for action %1. Action won't do anything."
,
this
),
LogLevel
.ERROR);
47
return
;
48
}
49
50
transformationEntity.
GetTransform
(transformation);
51
}
52
else
53
{
54
transformation[0] = m_vRotationX;
55
transformation[1] = m_vRotationY;
56
transformation[2] = m_vRotationZ;
57
transformation[3] = m_vTranslation;
58
}
59
60
entity.
SetTransform
(transformation);
61
entity.
Update
();
62
}
63
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
OnActivate
override void OnActivate()
Definition
SCR_CharacterCommandLoiter.c:31
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
IEntity
Definition
IEntity.c:13
IEntity::Update
proto external int Update()
IEntity::SetTransform
proto external bool SetTransform(vector mat[4])
IEntity::GetTransform
proto external void GetTransform(out vector mat[])
SCR_ContainerActionTitle
Definition
SCR_ContainerActionTitle.c:2
SCR_ScenarioFrameworkActionBase
Definition
SCR_ScenarioFrameworkActionBase.c:3
SCR_ScenarioFrameworkActionSetEntityTransformation
Definition
SCR_ScenarioFrameworkActionSetEntityTransformation.c:3
SCR_ScenarioFrameworkGet
Definition
SCR_ScenarioFrameworkGet.c:3
vector
Definition
vector.c:13
Print
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
LogLevel
Enum with severity of the logging message.
Definition
LogLevel.c:14
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
ScenarioFramework
Actions
SCR_ScenarioFrameworkActionSetEntityTransformation.c
Generated by
1.17.0