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_ScenarioFrameworkActionAttachToSlotManager.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_ContainerActionTitle
()]
2
class
SCR_ScenarioFrameworkActionAttachToSlotManager
:
SCR_ScenarioFrameworkActionBase
3
{
4
[
Attribute
(
desc
:
"Entity to play animation on"
)]
5
ref
SCR_ScenarioFrameworkGet
m_ActorGetter;
6
7
[
Attribute
(
desc
:
"Prop to be atteched"
)]
8
ref
SCR_ScenarioFrameworkGet
m_PropToAttachGetter;
9
10
[
Attribute
(
""
)]
11
string
m_sSlotName;
12
13
[
Attribute
(
"false"
,
UIWidgets
.Auto)]
14
bool
m_bDetachAndDelete;
15
16
//------------------------------------------------------------------------------------------------
17
override
void
OnActivate
(
IEntity
object
)
18
{
19
if
(!CanActivate())
20
return
;
21
22
IEntity
entity;
23
if
(!ValidateInputEntity(
object
, m_ActorGetter, entity))
24
return
;
25
26
IEntity
propEntity;
27
if
(!ValidateInputEntity(
object
, m_PropToAttachGetter, propEntity))
28
return
;
29
30
SlotManagerComponent slotManager = SlotManagerComponent.Cast(entity.
FindComponent
(SlotManagerComponent));
31
32
if
(!slotManager)
33
return
;
34
35
EntitySlotInfo
entityInSlot = slotManager.GetSlotByName(m_sSlotName);
36
if
(!entityInSlot)
37
return
;
38
39
if
(!m_bDetachAndDelete)
40
entityInSlot.AttachEntity(propEntity);
41
else
42
{
43
IEntity
entityToDetach = entityInSlot.GetAttachedEntity();
44
45
if
(entityToDetach)
46
SCR_EntityHelper
.DeleteEntityAndChildren(entityToDetach);
47
}
48
}
49
}
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
EntitySlotInfo
Adds ability to attach an object to a slot.
Definition
EntitySlotInfo.c:9
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
SCR_ContainerActionTitle
Definition
SCR_ContainerActionTitle.c:2
SCR_EntityHelper
Definition
SCR_EntityHelper.c:2
SCR_ScenarioFrameworkActionAttachToSlotManager
Definition
SCR_ScenarioFrameworkActionAttachToSlotManager.c:3
SCR_ScenarioFrameworkActionBase
Definition
SCR_ScenarioFrameworkActionBase.c:3
SCR_ScenarioFrameworkGet
Definition
SCR_ScenarioFrameworkGet.c:3
UIWidgets
Definition
attributes.c:40
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
ScenarioFramework
Actions
SCR_ScenarioFrameworkActionAttachToSlotManager.c
Generated by
1.17.0