5 SetVisibleDuringDaylight(
true);
8 SetFlareVisible(
false);
9 SetAmbientColor(1.0, 1.0, 1.0);
10 SetDiffuseColor(1.0, 1.0, 1.0);
17 SetFlickerAmplitudeMax(3);
18 SetFlickerAmplitudeMin(0);
23class FireworksLauncherClientEventBase
75 return "FireworksLauncher_Explosion_SoundSet";
100 Debug.
LogError(
"Failed to obtain color from color sequence");
226 ErrorEx(
"Incorrect explosion particle color in the sequence");
236 light.SetDiffuseColor(255, 51, 51);
237 light.SetAmbientColor(255, 51, 51);
241 light.SetDiffuseColor(0, 255, 128);
242 light.SetAmbientColor(0, 255, 128);
245 light.SetDiffuseColor(51, 153, 255);
246 light.SetAmbientColor(51, 153, 255);
249 light.SetDiffuseColor(255, 255, 51);
250 light.SetAmbientColor(255, 255, 51);
253 light.SetDiffuseColor(255, 102, 255);
254 light.SetAmbientColor(255, 102, 255);
257 ErrorEx(
"Incorrect explosion particle color in the sequence");
291 m_ShotDir.Normalize();
329 RegisterNetSyncVariableInt(
"m_Index", 0,
GetMaxShots());
330 RegisterNetSyncVariableInt(
"m_RandomSeed", 0, 1023);
332 RegisterNetSyncVariableInt(
"m_ColorSequenceIndex", 0,
lastIndex);
381 ErrorEx(
"Failed to obtain color sequence");
382 return "RYPBYYPBRGBYPBRGBRBGBPBRGRGBRBGRYPYR";
410 return "FireworksLauncher_Ignition_Loop_SoundSet";
425 return "Fireworks_Ammo";
436 switch (currentState)
444 HideSelection(
"cover");
448 HideSelection(
"cover");
456 switch (currentState)
503 PlaySoundSet(
m_FuseSoundStart,
"FireworksLauncher_Ignition_Start_SoundSet", 0, 0);
507 if (MemoryPointExists(
"Fuse_Start"))
509 fuseStart = GetMemoryPointPos(
"Fuse_Start");
512 if (MemoryPointExists(
"Fuse_End"))
514 fuseEnd = GetMemoryPointPos(
"Fuse_End");
542 SetHealth01(
"",
"", 0);
602 super.OnVariablesSynchronized();
622 if (!
super.OnStoreLoad(
ctx, version))
640 return "placeFireworks_SoundSet";
645 return "fireworks_deploy_SoundSet";
653 if (
GetGame().IsDedicatedServer())
DamageType
exposed from C++ (do not change)
Particle m_ParticleExplosion
particle
ExplosionLight PointLightBase OnFired()
vector GetExplosionPosition()
float GetExplosionDistance()
FireworksLauncherClientEvent m_ShotPos
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
void SetState(bool state)
class JsonUndergroundAreaTriggerData GetPosition
static void LogError(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as error message.
Wrapper class for managing sound through SEffectManager.
override void Stop()
Stops sound.
int GetSecondaryExplosionDelay()
void FireworksLauncherClientEvent(FireworksLauncher item, int index)
int m_RemainingExplosions
void ~FireworksLauncherClientEvent()
ParticleSource m_ParticleAfterBurnEnd
ExplosionLight m_ExplosionLight
ref array< ref FireworksLauncherClientEventBase > m_Events
ParticleSource m_ParticleExplosion
float GetExplosionDistance()
void SpawnSecondaryExplosion()
int GetSecondaryExplosionCount()
int GetExplParticleFromSequence()
void SetupLight(PointLightBase light)
string GetExplosionSoundSet()
void PlayExplosionSound()
void CalculateExplosionPosition()
void RequestSecondaryExplosion()
float GetExplosionDelay()
vector GetExplosionPosition()
EffectSound m_ExplosionSound
float GetShotDispersionAngle()
ParticleSource m_ParticleShot
float GetMaxAllowedWetness()
void RestartEventTimer()
Starts event timer.
void OnStateChangedServer(EFireworksState currentState)
override string GetLoopDeploySoundset()
void OnIndexChangedClient()
ref array< ref FireworksLauncherClientEventBase > m_Events
override string GetDeploySoundset()
void OnEventServer(int type)
Called periodically but only after the entity gets ignited.
FireworksLauncherClientEventBase SpawnEvent()
bool CanIgniteItem(EntityAI ignite_target=NULL)
void OnPlacementComplete(Man player, vector position="0 0 0", vector orientation="0 0 0")
string GetColorSequence()
override float GetDeployTime()
how long it takes to deploy this item in seconds
void OnStoreSave(ParamsWriteContext ctx)
bool OnStoreLoad(ParamsReadContext ctx, int version)
void OnVariablesSynchronized()
bool CanPutInCargo(EntityAI parent)
void OnFiringStartClient()
EffectSound m_FuseSoundStart
void SetupColorSequences()
bool CanPutIntoHands(EntityAI parent)
void ~FireworksLauncher()
ParticleSource m_ParticleFuse
void OnFuseIgnitedClient()
ParticleSource m_ParticleAfterBurnEnd
override bool IsDeployable()
void OnFiringStartServer()
ref array< string > m_ColorSequence
override void OnIgnitedThis(EntityAI fire_source)
Executed on Server when some item ignited this one.
void OnStateChangedClient(EFireworksState currentState)
void OnFuseIgnitedServer()
void Stop()
Legacy function for backwards compatibility with 1.14 and below.
static const int FIREWORKS_AFTERBURN_END
static const int FIREWORKS_EXPLOSION_YELLOW
static const int FIREWORKS_EXPLOSION_BLUE
static const int FIREWORKS_EXPLOSION_RED
static const int FIREWORKS_FUSE
static const int FIREWORKS_EXPLOSION_GREEN
static const int FIREWORKS_SHOT
static const int FIREWORKS_EXPLOSION_PINK
Entity which has the particle instance as an ObjectComponent.
override bool StopParticle(int flags=0)
Method to tell the particle to stop playing.
proto native void SetOwner(Class owner)
Set the owner of this ParticleSource.
Manager class for managing Effect (EffectParticle, EffectSound)
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Serialization general interface. Serializer API works with:
proto native CGame GetGame()
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto int Randomize(int seed)
Sets the seed for the random number generator.
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].
proto native int Length()
Returns length of string.
proto string Get(int index)
Gets n-th character from string.
proto native int GetState()
returns one of STATE_...