104 lines
3.3 KiB
Ucode
104 lines
3.3 KiB
Ucode
// The fire that gets spawned when a Fuel puddle is shot. This damages pawns and then dissipates.
|
|
class FuelFlame extends Emitter;
|
|
|
|
var () float BurnInterval; // Interval between burn damage.
|
|
var Actor Parent; // Parent Actor
|
|
var () int FlameDamage; // How much dmg the touchee takes.
|
|
|
|
static function PreInitialize( int Damage, float Interval )
|
|
{
|
|
// You can preserve the original default values in other default variables if you want, and restore them in prebeginplay. If you want.
|
|
default.BurnInterval = Interval;
|
|
default.FlameDamage = Damage;
|
|
}
|
|
|
|
simulated function PostBeginPlay()
|
|
{
|
|
SetTimer(BurnInterval,True);
|
|
}
|
|
|
|
function Timer()
|
|
{
|
|
local Material SurfaceMat;
|
|
local int HitSurface;
|
|
local Vector HitLocation, HitNormal;
|
|
local rotator EffectDir;
|
|
local Actor Other;
|
|
|
|
Other = Trace(HitLocation, HitNormal, Location + vector(Rotation) * 32, Location - vector(Rotation) * 16, true,, SurfaceMat);
|
|
|
|
EffectDir = rotator(MirrorVectorByNormal(vector(Rotation), HitNormal));
|
|
|
|
if(Vehicle(Other) != None && Other.SurfaceType == 0)
|
|
HitSurface = 3;
|
|
else if(Other != None && !Other.IsA('LevelInfo') && Other.SurfaceType != 0)
|
|
HitSurface = Other.SurfaceType;
|
|
else if(SurfaceMat != None)
|
|
HitSurface = SurfaceMat.SurfaceType;
|
|
|
|
if (SurfaceMat != none && Parent == none)
|
|
{
|
|
if (KFHumanPawn(Instigator) != none)
|
|
Kill();
|
|
}
|
|
if( Parent==none || Parent.DrawScale<=0.25 )
|
|
Kill();
|
|
}
|
|
|
|
|
|
defaultproperties
|
|
{
|
|
|
|
Begin Object Class=SpriteEmitter Name=SpriteEmitter10
|
|
SecondsBeforeInactive = 30
|
|
UseColorScale=True
|
|
SpinParticles=True
|
|
UseSizeScale=True
|
|
UseRegularSizeScale=False
|
|
UniformSize=True
|
|
UseRandomSubdivision=True
|
|
Acceleration=(Z=100.000000)
|
|
ColorScale(1)=(RelativeTime=0.300000,Color=(B=255,G=255,R=255))
|
|
ColorScale(2)=(RelativeTime=0.750000,Color=(B=96,G=160,R=255))
|
|
ColorScale(3)=(RelativeTime=1.000000)
|
|
ColorMultiplierRange=(Z=(Min=0.670000,Max=2.000000))
|
|
MaxParticles=15
|
|
Name="SpriteEmitter10"
|
|
StartLocationShape=PTLS_Sphere
|
|
SphereRadiusRange=(Max=5.000000)
|
|
SpinsPerSecondRange=(X=(Max=0.070000))
|
|
StartSpinRange=(X=(Max=1.000000))
|
|
SizeScale(0)=(RelativeTime=1.000000,RelativeSize=0.500000)
|
|
StartSizeRange=(X=(Min=56.000000,Max=45.000000),Y=(Min=0.000000,Max=0.000000),Z=(Min=0.000000,Max=0.000000))
|
|
ScaleSizeByVelocityMultiplier=(X=0.000000,Y=0.000000,Z=0.000000)
|
|
ScaleSizeByVelocityMax=0.000000
|
|
Texture=Texture'KillingFloorTextures.LondonCommon.fire3'
|
|
TextureUSubdivisions=2
|
|
TextureVSubdivisions=2
|
|
LifetimeRange=(Min=0.750000,Max=1.250000)
|
|
StartVelocityRange=(X=(Min=-10.000000,Max=10.000000),Y=(Min=-10.000000,Max=10.000000),Z=(Min=25.000000,Max=75.000000))
|
|
End Object
|
|
|
|
Emitters(0) = SpriteEmitter'SpriteEmitter10'
|
|
|
|
bNoDelete = false
|
|
|
|
SoundVolume = 255
|
|
SoundRadius = 100
|
|
bFullVolume = false
|
|
AmbientSound = Sound'Amb_Destruction.Kessel_Fire_Small_Vehicle'//Sound'GeneralAmbience.firefx12' KFTODO: Replace this
|
|
|
|
LightRadius = 4
|
|
LightType = LT_Pulse
|
|
|
|
LightBrightness = 300
|
|
LightHue = 30
|
|
LightSaturation = 100
|
|
bDynamicLight = true
|
|
|
|
FlameDamage = 10
|
|
BurnInterval = 1
|
|
|
|
LifeSpan=6
|
|
}
|