Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

XEffects.NewTracer


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
class NewTracer extends Emitter;

#exec OBJ LOAD FILE=..\Textures\AW-2004Particles.utx

simulated function SpawnParticle( int Amount )
{
    local PlayerController PC;
    local vector Dir, LineDir, LinePos, RealLocation;
    
    Super.SpawnParticle(Amount);
    
    if ( (Instigator == None) || Instigator.IsFirstPerson() )
        return;
   
    // see if local player controller near bullet, but missed
    PC = Level.GetLocalPlayerController();
    if ( (PC != None) && (PC.Pawn != None) )
    {
        Dir.X = Emitters[0].StartVelocityRange.X.Min;
        Dir.Y = Emitters[0].StartVelocityRange.Y.Min;
        Dir.Z = Emitters[0].StartVelocityRange.Z.Min;
        Dir = Normal(Dir);
        LinePos = (Location + (Dir dot (PC.Pawn.Location - Location)) * Dir);
        LineDir = PC.Pawn.Location - LinePos;
        if ( VSize(LineDir) < 150 )
        {
            RealLocation = Location;
            SetLocation(LinePos);
            if ( FRand() < 0.5 )
                PlaySound(sound'Impact3Snd',,,,80);
            else
                PlaySound(sound'Impact7Snd',,,,80);
            SetLocation(RealLocation);
        }
    }
}

defaultproperties
{
     Begin Object Class=SpriteEmitter Name=SpriteEmitter13
         UseDirectionAs=PTDU_Right
         RespawnDeadParticles=False
         UseSizeScale=True
         UseAbsoluteTimeForSizeScale=True
         UseRegularSizeScale=False
         ScaleSizeXByVelocity=True
         AutomaticInitialSpawning=False
         ExtentMultiplier=(X=0.200000)
         ColorMultiplierRange=(Y=(Min=0.800000,Max=0.800000),Z=(Min=0.500000,Max=0.500000))
         MaxParticles=100
         SizeScale(1)=(RelativeTime=0.030000,RelativeSize=1.000000)
         StartSizeRange=(X=(Min=20.000000,Max=20.000000),Y=(Min=10.000000,Max=10.000000))
         ScaleSizeByVelocityMultiplier=(X=0.002000)
         Texture=Texture'AW-2004Particles.Weapons.TracerShot'
         LifetimeRange=(Min=0.100000,Max=0.100000)
         StartVelocityRange=(X=(Min=10000.000000,Max=10000.000000))
     End Object
     Emitters(0)=SpriteEmitter'XEffects.NewTracer.SpriteEmitter13'

     bNoDelete=False
     bHardAttach=True
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Mon 23/10/2006 20:37:02.000 - Creation time: Wed 7/2/2007 19:16:45.406 - Created with UnCodeX