6class SCR_MotorExhaustEffectGeneralComponent : MotorExhaustEffectComponent
38 [
Attribute(
"{AEA751F0BE7FE821}Particles/Vehicle/Vehicle_smoke_car_exhaust_damage.ptc",
UIWidgets.ResourceNamePicker,
desc:
"Particle effect for damaged engine",
params:
"ptc")]
68 super.OnDelete(owner);
75 protected static int GetStageIndex(
string emitterName)
77 static const string EMITTER_STAGE_PREFIX =
"s";
78 static const string EMITTER_STAGE_SUFIX =
"_";
80 int offset = EMITTER_STAGE_PREFIX.Length();
81 if (!emitterName.StartsWith(EMITTER_STAGE_PREFIX) || !emitterName.IsDigitAt(offset))
85 int stageNo = emitterName.ToInt(offset: offset, parsed: numberLen);
87 if (!emitterName.ContainsAt(EMITTER_STAGE_SUFIX, offset))
98 protected static array<ref array<int>> CreateStageIndexes(notnull
ParticleEffectEntity effectEntity)
100 Particles particles = effectEntity.GetParticles();
104 array<ref array<int>> ret = {{}};
106 array<string> emitterNames = {};
107 int emitterNamesCount = particles.GetEmitterNames(emitterNames);
109 for (
int i; i < emitterNamesCount; i++)
111 int stage = GetStageIndex(emitterNames[i]);
115 if (stage >= ret.Count())
116 ret.Resize(stage + 1);
121 ret[stage].Insert(i);
162 CameraBase camera =
GetGame().GetCameraManager().CurrentCamera();
268 spawnParams.PivotID = effectPosition.GetNodeId();
269 effectPosition.GetLocalTransform(spawnParams.Transform);
272 spawnParams.UseFrameEvent =
true;
281 Particles particles = effectEntity.GetParticles();
285 if (stageIndexes && !stageIndexes.IsEmpty())
289 particles.SetParam(-1,
EmitterParam.BIRTH_RATE_RND, 0.0);
292 int iMaxStage = stageIndexes.Count();
294 array<int> stageEmitterIDs = stageIndexes[stage];
297 for (
int i; i < stageEmitterIDs.Count(); i++)
ArmaReforgerScripted GetGame()
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
DamageManagerComponent m_DamageManager
ResourceName m_sDamagedParticle
const float TICK_TIME_DELAY_MAX
ref array< ref array< int > > m_aDamageStagesEmitters
float m_fCurrentUpdateDelay
SCR_MotorExhaustEffectGeneralComponentClass m_ExhaustEmitter
void UpdateExhaustEmitter(float timeSlice, bool paused=false)
Ignition engine exhaust.
void UpdateExhaustParticles(float timeSlice)
void OnGamePauseChanged(bool paused)
ref array< ref array< int > > m_aExhaustStagesEmitters
ParticleEffectEntity m_DamagedEmitter
const float TICK_DELAY_RANGE_START
int m_iIsExhaustUnderWaterSignalIdx
void ConnectToMotorExhaustSystem()
void CreateDamageEffect()
Create damaged exhaust particles.
const float TICK_DELAY_RANGE_END
void UpdateDamagedEmitter(float timeSlice)
Damaged engine exhaust.
void OnEngineStop()
Turn off the effect and pause the damaged exhaust effect.
void AdjustEngineEffects(notnull ParticleEffectEntity effectEntity, array< ref array< int > > stageIndexes)
void DisconnectFromMotorExhaustSystem()
void ParticleEffectEntity(IEntitySource src, IEntity parent)
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
SignalsManagerComponent m_SignalsManager
void SCR_VehicleDamageManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
override void OnEngineStart()
Is called every time the engine starts.
Adds ability to attach an object to a slot.
proto external Managed FindComponent(typename typeName)
proto external BaseWorld GetWorld()
void Register(SCR_MotorExhaustEffectGeneralComponent component)
void Unregister(SCR_MotorExhaustEffectGeneralComponent component)
IEntity GetOwner()
Owner entity of the fuel tank.
HYBRID_COMPONENT_ICON
Default icon for all components written in script that don't inherit ScriptComponent.
SCR_FieldOfViewSettings Attribute
BaseEffectComponentClass GameComponentClass GetParticleEntity()
Returns the particle entity associated with this effect component.
proto external float GetSignalThrust()
proto external float GetRpmScaled()
proto external EntitySlotInfo GetEffectPosition()
void TurnOff()
Remove every particle associed with this effect.