Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ParticleEditorEffect.c
Go to the documentation of this file.
1 [BaseContainerProps(), SCR_BaseContainerCustomTitleResourceName("m_Particle", true, "PFX: \"%1\"")]
8 {
9  [Attribute(params: "ptc", desc: "Particle effect file")]
10  private ResourceName m_Particle;
11 
12  [Attribute("0", UIWidgets.ComboBox, "", enums: ParamEnumArray.FromEnum(EEditorEffectTarget))]
13  private EEditorEffectTarget m_Target;
14 
15  override bool EOnActivate(SCR_BaseEditorComponent editorComponent, vector position = vector.Zero, set<SCR_EditableEntityComponent> entities = null)
16  {
17  switch (m_Target)
18  {
19  case EEditorEffectTarget.CURSOR:
20  {
21  Print("ToDo: CURSOR particle effect");
22  break;
23  }
24  case EEditorEffectTarget.ROOT_ENTITY:
25  {
26  if (!entities || entities.Count() == 0) return false;
27  vector pos;
28  if (entities[0].GetPos(pos))
29  {
30  ParticleEffectEntitySpawnParams spawnParams();
31  spawnParams.Transform[3] = pos;
32  spawnParams.UseFrameEvent = true;
33  ParticleEffectEntity.SpawnParticleEffect(m_Particle, spawnParams);
34  }
35  break;
36  }
37  case EEditorEffectTarget.ALL_ENTITIES:
38  {
39  if (!entities || entities.Count() == 0) return false;
40  vector pos;
41  foreach (SCR_EditableEntityComponent entity: entities)
42  {
43  if (entity.GetPos(pos))
44  {
45  ParticleEffectEntitySpawnParams spawnParams();
46  spawnParams.Transform[3] = pos;
47  spawnParams.UseFrameEvent = true;
48  ParticleEffectEntity.SpawnParticleEffect(m_Particle, spawnParams);
49  }
50  }
51  break;
52  }
53  }
54  return true;
55  }
56 };
57 
59 {
63 };
SCR_BaseContainerCustomTitleResourceName
SCR_CampaignMilitaryBaseComponent SCR_MilitaryBaseComponent SCR_BaseContainerCustomTitleResourceName("m_sBaseName", true)
Definition: SCR_CampaignMilitaryBaseComponent.c:2522
EEditorEffectTarget
EEditorEffectTarget
Definition: SCR_ParticleEditorEffect.c:58
CURSOR
@ CURSOR
Definition: SCR_ParticleEditorEffect.c:62
SCR_ParticleEditorEffect
Definition: SCR_ParticleEditorEffect.c:7
m_Target
class SCR_AIPolar m_Target
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
GetPos
override bool GetPos(out vector pos)
Definition: SCR_EditableFactionComponent.c:325
ROOT_ENTITY
@ ROOT_ENTITY
Definition: SCR_ParticleEditorEffect.c:60
m_Particle
ResourceName m_Particle
Definition: SCR_ParticleContactComponent.c:12
SCR_BaseEditorComponent
Definition: SCR_BaseEditorComponent.c:119
Attribute
typedef Attribute
Post-process effect of scripted camera.
ALL_ENTITIES
@ ALL_ENTITIES
Definition: SCR_ParticleEditorEffect.c:61
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
params
Configs ServerBrowser KickDialogs params
Definition: SCR_NotificationSenderComponent.c:24
position
vector position
Definition: SCR_DestructibleTreeV2.c:30
SCR_BaseEditorEffect
Definition: SCR_BaseEditorEffect.c:7
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468