10 [
Attribute(
desc:
"If not checked, the modul is activated and deactivated only with physics event. If checked, the effect is always active")]
74 spawnParams.UseFrameEvent =
true;
77 spawnParams.Transform = transform;
84 protected void WB_PlayEffect()
160 void WB_Update(
IEntity owner,
float timeSlice)
167 void WB_OnInit(
IEntity owner, inout vector mat[4], IEntitySource src)
196 super.Update(owner, timeSlice);
264 protected string m_sSignal;
267 [
Attribute(
desc:
"Value of signal when the action will be executed")]
268 protected float m_fSignalValue;
269 protected int m_iSignalID;
273 override void Init(notnull SCR_EffectModule module)
296 m_bPerformed =
false;
303 if (SCR_Comparer<float>.
Compare(m_eOperator, (
float)
m_SignalManager.GetSignalValue(m_iSignalID), (
float)m_fSignalValue ))
323 [
Attribute(defvalue:
"0",
UIWidgets.ComboBox,
"Events",
"", ParamEnumArray.FromEnum(EVehicleEvent))]
326 [
Attribute(defvalue:
"0",
desc:
"Perform the action only once")]
337 case EVehicleEvent.ON_ENGINE_START:
342 case EVehicleEvent.ON_ENGINE_STOP:
357 IEntity owner =
module.GetOwner();
363 Print(
"SCR_HelicopterControllerComponent controller not found. Action won't work",
LogLevel.WARNING);
380 super.PerformAction();
392 [
Attribute(
"", UIWidgets.EditBox,
"Speed in m/s which tops the effect's interpolation from 100 to 0% lifetime value" )]
393 float m_ExhaustEndSpeedInM;
395 const string SIGNAL_RPM =
"MainRotorRPM";
396 const int RPM_THRESHOLD = 50;
397 protected int m_iSignalID;
402 override void Init(notnull SCR_EffectModule module)
419 particles = m_EffectEntity.GetParticles();
421 if (!particles &&
m_SignalManager.GetSignalValue(m_iSignalID) > RPM_THRESHOLD)
426 if (particles &&
m_SignalManager.GetSignalValue(m_iSignalID) < RPM_THRESHOLD)
429 m_EffectEntity = null;
433 if (!particles && m_Module.GetEmitter())
435 m_EffectEntity = m_Module.GetEmitter();
437 particles = m_EffectEntity.GetParticles();
443 if (m_ExhaustEndSpeedInM <= 0)
446 Physics physics = m_Module.GetOwner().GetPhysics();
450 float speed_m_per_s = physics.GetVelocity().Length();
451 float lifetime_scale = Math.Clamp(1 - (speed_m_per_s / m_ExhaustEndSpeedInM), 0, 1);
453 particles.MultParam(-1,
EmitterParam.LIFETIME, lifetime_scale);
454 particles.MultParam(-1,
EmitterParam.LIFETIME_RND, lifetime_scale);
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
void ParticleEffectEntity(IEntitySource src, IEntity parent)
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
ScriptInvokerBase< ScriptInvokerVoidMethod > ScriptInvokerVoid
SCR_VONRadialDisplay Compare
SignalsManagerComponent m_SignalManager
enum EVehicleType IEntity
proto external Managed FindComponent(typename typeName)
PointInfo - allows to define position.
void Init(notnull SCR_EffectModule module)
SCR_EmitterParam m_Parameter
SCR_EffectModule m_Module
ScriptInvokerVoid m_EventHandler
override void Init(notnull SCR_EffectModule module)
override void PerformAction()
SCR_HelicopterControllerComponent m_VehicleController
override void Init(SCR_BaseEffectManagerComponent manager)
override void Update(IEntity owner, float timeSlice)
SCR_HelicopterControllerComponent m_HelicopterController
SignalsManagerComponent GetSignalManager()
SCR_BaseEffectManagerComponent m_Manager
SignalsManagerComponent m_SignalManager
ParticleEffectEntity m_sParticleEffect
ref array< ref SCR_BaseEffectParticleAction > m_aEffectActions
ref PointInfo m_effectPosition
void Init(SCR_BaseEffectManagerComponent manager)
void Update(IEntity owner, float timeSlice)
ParticleEffectEntity GetEmitter()
void CreateEmitter(bool PlayOnSpawn=false)
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
proto void PrintFormat(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL, LogLevel level=LogLevel.NORMAL)
SCR_FieldOfViewSettings Attribute