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_EditableEffectModuleComponent.c
Go to the documentation of this file.
1
[
ComponentEditorProps
(
category
:
"GameScripted/Editor (Editables)"
, description:
""
, icon:
"WBData/ComponentEditorProps/componentEditor.png"
)]
2
class
SCR_EditableEffectsModuleComponentClass
:
SCR_EditableDescriptorComponentClass
3
{
4
};
5
8
12
class
SCR_EditableEffectsModuleComponent
: SCR_EditableSystemComponent
13
{
14
//------------------------------------------------------------------------------------------------
15
override
bool
IsDestroyed
()
16
{
17
return
!
CanDestroy
();
18
}
19
20
//------------------------------------------------------------------------------------------------
21
override
bool
CanDestroy
()
22
{
23
GenericEntity
child =
GenericEntity
.Cast(
GetOwner
().
GetChildren
());
24
while
(child)
25
{
26
if
(child.
FindComponent
(SCR_PressureTriggerComponent) && child.
FindComponent
(
SCR_EffectsModuleChildComponent
))
27
return
true
;
28
29
child =
GenericEntity
.Cast(child.
GetSibling
());
30
}
31
32
return
false
;
33
}
34
35
//------------------------------------------------------------------------------------------------
36
//~ Destroys one entity. Will return true if all entities are destroyed
37
override
bool
Destroy(
int
editorPlayerID)
38
{
39
SCR_PressureTriggerComponent pressureTriggerComponent;
40
41
GenericEntity
child =
GenericEntity
.Cast(
GetOwner
().
GetChildren
());
42
while
(child)
43
{
44
if
(!child.
FindComponent
(
SCR_EffectsModuleChildComponent
))
45
{
46
child =
GenericEntity
.Cast(child.
GetSibling
());
47
continue
;
48
}
49
50
pressureTriggerComponent = SCR_PressureTriggerComponent.Cast(child.
FindComponent
(SCR_PressureTriggerComponent));
51
if
(!pressureTriggerComponent)
52
{
53
child =
GenericEntity
.Cast(child.
GetSibling
());
54
continue
;
55
}
56
57
pressureTriggerComponent.SetInstigator(
Instigator
.CreateInstigatorGM(editorPlayerID));
58
pressureTriggerComponent.TriggerManuallyServer();
59
break
;
60
}
61
62
return
IsDestroyed
();
63
}
64
65
//------------------------------------------------------------------------------------------------
66
override
bool
SetTransform(
vector
transform[4],
bool
changedByUser =
false
)
67
{
68
if
(!super.SetTransform(transform, changedByUser))
69
return
false
;
70
71
if
(!
IsServer
() || !
m_Owner
)
72
return
false
;
73
74
SCR_EffectsModuleComponent
effectModuleComponent =
SCR_EffectsModuleComponent
.Cast(
m_Owner
.FindComponent(
SCR_EffectsModuleComponent
));
75
if
(!effectModuleComponent)
76
return
false
;
77
78
//~ Snaps non-editable children to terrain again if need be
79
effectModuleComponent.OnTransformChanged();
80
return
true
;
81
}
82
83
//------------------------------------------------------------------------------------------------
84
override
void
RemoveParentEntity()
85
{
86
RPC_RemoveParentEntityBroadcast
();
87
Rpc(
RPC_RemoveParentEntityBroadcast
);
88
89
super.RemoveParentEntity();
90
}
91
92
//------------------------------------------------------------------------------------------------
93
[
RplRpc
(
RplChannel
.Reliable,
RplRcver
.Broadcast)]
94
protected
void
RPC_RemoveParentEntityBroadcast
()
95
{
96
SCR_EffectsModuleComponent
effectModuleComponent =
SCR_EffectsModuleComponent
.Cast(
GetOwner
().FindComponent(
SCR_EffectsModuleComponent
));
97
if
(effectModuleComponent)
98
effectModuleComponent.
EditorOnRemovedFromParent
();
99
}
100
101
//------------------------------------------------------------------------------------------------
102
override
bool
Delete
(
bool
changedByUser =
false
,
bool
updateNavmesh =
true
)
103
{
104
SCR_EffectsModuleComponent
effectModuleComponent =
SCR_EffectsModuleComponent
.Cast(
GetOwner
().FindComponent(
SCR_EffectsModuleComponent
));
105
if
(!effectModuleComponent || effectModuleComponent.
EditorInstantDelete
())
106
return
super.Delete(changedByUser, updateNavmesh);
107
108
RemoveParentEntity();
109
return
true
;
110
}
111
}
ComponentEditorProps
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
Definition
SCR_AIGroupUtilityComponent.c:12
m_Owner
IEntity m_Owner
Definition
SCR_CampaignServiceCompositionComponent.c:18
CanDestroy
override bool CanDestroy()
Definition
SCR_EditableExplosiveChargeComponent.c:61
IsDestroyed
override bool IsDestroyed()
Definition
SCR_EditableExplosiveChargeComponent.c:54
IsServer
override bool IsServer()
Definition
SCR_NewSessionToolbarAction.c:35
GetChildren
void GetChildren(out array< SCR_ScenarioFrameworkLayerBase > children)
Definition
SCR_ScenarioFrameworkLayerBase.c:559
category
params category
Definition
SCR_VehicleDamageManagerComponent.c:302
GenericEntity
Definition
GenericEntity.c:16
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
IEntity::GetSibling
proto external IEntity GetSibling()
Instigator
Definition
Instigator.c:13
SCR_EditableDescriptorComponentClass
Definition
SCR_EditableDescriptorComponent.c:7
SCR_EditableEffectsModuleComponentClass
Definition
SCR_EditableEffectModuleComponent.c:3
SCR_EditableEffectsModuleComponent
Definition
SCR_EditableEffectModuleComponent.c:13
SCR_EditableEffectsModuleComponent::Delete
override bool Delete(bool changedByUser=false, bool updateNavmesh=true)
Definition
SCR_EditableEffectModuleComponent.c:102
SCR_EditableEffectsModuleComponent::RPC_RemoveParentEntityBroadcast
void RPC_RemoveParentEntityBroadcast()
Definition
SCR_EditableEffectModuleComponent.c:94
SCR_EffectsModuleChildComponent
Definition
SCR_EffectModuleChildComponent.c:6
SCR_EffectsModuleComponent
Definition
SCR_EffectModuleComponent.c:11
SCR_EffectsModuleComponent::EditorOnRemovedFromParent
void EditorOnRemovedFromParent()
Definition
SCR_EffectModuleComponent.c:420
SCR_EffectsModuleComponent::EditorInstantDelete
bool EditorInstantDelete()
Definition
SCR_EffectModuleComponent.c:37
vector
Definition
vector.c:13
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition
SCR_FuelNode.c:128
RplRpc
void RplRpc(RplChannel channel, RplRcver rcver, RplCondition condition=RplCondition.None, string customConditionName="")
Definition
EnNetwork.c:95
RplRcver
RplRcver
Definition
RplRcver.c:59
RplChannel
RplChannel
Communication channel. Reliable is guaranteed to be delivered. Unreliable not.
Definition
RplChannel.c:14
scripts
Game
Editor
Components
EditableEntity
SCR_EditableEffectModuleComponent.c
Generated by
1.17.0