DeathEffects

From Cosmoteer Wiki
< Modding‎ | ComponentsModding/Components/DeathEffects
Jump to navigation Jump to search

Code locations (what's this?):

Cosmoteer.Ships.Parts.Effects.PartDeathEffects
Cosmoteer.Ships.Parts.Effects.PartDeathEffectsRules


Alias DeathEffectRules.

A part sub-component that performs hit and media effects when the part is destroyed.

That means HitEffects and MultiMediaEffects.

This is a component that inherits from OperationalChainablePartComponent.

Used by every part.

Parameters (Complete list)
Name Type Required? Buffable? Default value Description
MediaEffects MultiMediaEffectRules? - - -
HitEffects MultiHitEffectRules? - - -
MediaEffectsFactor Float - Yes 1
HitEffectsFactor Float - Yes 1
FactorMediaEffectsWith ID<PartComponentRules>? - - -
FactorHitEffectsWith ID<PartComponentRules>? - - -
WhenSalvaged bool - - -
SuppressWhenSpawnedFromDestroyedTime Time - - 0.5

Examples

reactor_small :

DestroyedEffects
{
	Type = DeathEffects
	Location = [1, 1]

	MediaEffects
	[
		&<particles/reactor_explode_small.rules>
		//...

		: /BASE_SOUNDS/AudioExterior
		{
			//...
		}

		: /BASE_SHAKE
		{
			//...
		}
	]

	HitEffects
	[
		{
			Type = ExplosiveDamage
			TotalDamage = 90000
			// ...
			Filter
			{
				//...
			}
		}
		{
			Type = ExplosiveDamage
			//...
			Filter
			{
				//...
			}
		}
	]
}

See also