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_ScenarioFrameworkActionSetEntityPosition.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_ContainerActionTitle
()]
2
class
SCR_ScenarioFrameworkActionSetEntityPosition
:
SCR_ScenarioFrameworkActionBase
3
{
4
[
Attribute
(
desc
:
"Entity to be teleported (Optional if action is attached on Slot that spawns target entity)"
)]
5
ref
SCR_ScenarioFrameworkGet
m_EntityGetter;
6
7
[
Attribute
(defvalue:
"0 0 0"
,
desc
:
"Position that the entity will be teleported to"
)]
8
vector
m_vDestination;
9
10
[
Attribute
(
desc
:
"Name of the entity that above selected entity will be teleported to (Optional)"
)]
11
ref
SCR_ScenarioFrameworkGet
m_DestinationEntityGetter;
12
13
[
Attribute
(defvalue:
"0 0 0"
,
desc
:
"Position that will be used in relation to the entity for the position to teleport to (Optional)"
)]
14
vector
m_vDestinationEntityRelativePosition;
15
16
//------------------------------------------------------------------------------------------------
17
override
void
OnActivate
(
IEntity
object
)
18
{
19
if
(!CanActivate())
20
return
;
21
22
IEntity
entity;
23
if
(!ValidateInputEntity(
object
, m_EntityGetter, entity))
24
return
;
25
26
if
(!m_DestinationEntityGetter)
27
{
28
entity.
SetOrigin
(m_vDestination);
29
entity.
Update
();
30
return
;
31
}
32
33
SCR_ScenarioFrameworkParam<IEntity> destinationEntityWrapper = SCR_ScenarioFrameworkParam<IEntity>.Cast(m_DestinationEntityGetter.Get());
34
if
(!destinationEntityWrapper)
35
{
36
Print
(
string
.Format(
"ScenarioFramework Action: Destination Entity Getter has issues for action %1. Action won't do anything."
,
this
),
LogLevel
.ERROR);
37
return
;
38
}
39
40
IEntity
destinationEntity = destinationEntityWrapper.GetValue();
41
if
(!destinationEntity)
42
{
43
Print
(
string
.Format(
"ScenarioFramework Action: Destination Entity could not be found for action %1. Action won't do anything."
,
this
),
LogLevel
.ERROR);
44
return
;
45
}
46
47
entity.
SetOrigin
(destinationEntity.
GetOrigin
() + m_vDestinationEntityRelativePosition);
48
entity.
Update
();
49
}
50
}
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::SetOrigin
proto external void SetOrigin(vector orig)
IEntity::GetOrigin
proto external vector GetOrigin()
IEntity::Update
proto external int Update()
SCR_ContainerActionTitle
Definition
SCR_ContainerActionTitle.c:2
SCR_ScenarioFrameworkActionBase
Definition
SCR_ScenarioFrameworkActionBase.c:3
SCR_ScenarioFrameworkActionSetEntityPosition
Definition
SCR_ScenarioFrameworkActionSetEntityPosition.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_ScenarioFrameworkActionSetEntityPosition.c
Generated by
1.17.0