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

UnrealI.KraalBolt


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
//=============================================================================
// KraalBolt.
//=============================================================================
class KraalBolt expands Projectile;

#exec AUDIO IMPORT FILE="Sounds\Krall\krasht2.wav" NAME="Krasht2" GROUP="Krall"

#exec MESH IMPORT MESH=Krallbm ANIVFILE=MODELS\cros_t_a.3D DATAFILE=MODELS\cros_t_d.3D X=0 Y=0 Z=0 
#exec MESH ORIGIN MESH=Krallbm X=0 Y=0 Z=0 YAW=-64
#exec MESH SEQUENCE MESH=Krallbm SEQ=All STARTFRAME=0  NUMFRAMES=1
#exec MESH SEQUENCE MESH=Krallbm SEQ=Still  STARTFRAME=0 NUMFRAMES=1
#exec MESHMAP SCALE MESHMAP=Krallbm X=0.04 Y=0.04 Z=0.08
#exec OBJ LOAD FILE=Textures\fireeffect1.utx PACKAGE=UNREALI.Effect1
#exec MESHMAP SETTEXTURE MESHMAP=Krallbm NUM=0 TEXTURE=Unreali.Effect1.FireEffect1a
#exec MESHMAP SETTEXTURE MESHMAP=Krallbm NUM=1 TEXTURE=Unreali.Effect1.FireEffect1
  
function PostBeginPlay()
{
    if ( ScriptedPawn(Instigator) != None )
        Speed = ScriptedPawn(Instigator).ProjectileSpeed;
    Velocity = Vector(Rotation) * speed;
    PlaySound(SpawnSound,SLOT_None,4.0);
    Super.PostBeginPlay();
} 

function Explode(vector HitLocation, vector HitNormal)
{
    PlaySound(ImpactSound, SLOT_Interact);
    MakeNoise(1.0);
    spawn(class'SmokeColumn',,,Location+Vect(0,0,38));
    destroy();
}
    

auto state Flying
{
    function ProcessTouch (Actor Other, Vector HitLocation)
    {
        local vector momentum;
    
        if ( (Krall(Other) == None) && (KraalBolt(Other) == None))
        {
            momentum = MomentumTransfer * Normal(Velocity);
            Other.TakeDamage( Damage, instigator, HitLocation, momentum, 'zapped');
            Destroy();
        }
    }

Begin:
    Sleep(7.0); //self destruct after 7.0 seconds
    Explode(Location, vect(0,0,0));
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: za 22-4-2006 12:52:32.000 - Creation time: za 22-4-2006 12:53:45.687 - Created with UnCodeX