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
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
//=============================================================================
// KraalBolt.
//=============================================================================
class KraalBolt extends Projectile;

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

#exec MESH IMPORT MESH=Krallbm ANIVFILE=..\UnrealShare\MODELS\cros_t_a.3D DATAFILE=..\UnrealShare\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=..\UnrealShare\Textures\fireeffect1.utx PACKAGE=UNREALSHARE.Effect1
#exec MESHMAP SETTEXTURE MESHMAP=Krallbm NUM=0 TEXTURE=UnrealShare.Effect1.FireEffect1a
#exec MESHMAP SETTEXTURE MESHMAP=Krallbm NUM=1 TEXTURE=UnrealShare.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 MakeSound()
{
    PlaySound(ImpactSound, SLOT_Interact);
    MakeNoise(1.0);
}

simulated function Explode(vector HitLocation, vector HitNormal)
{
    local SmokeColumn s;

    MakeSound();
    s = spawn(class'SmokeColumn',,,Location+Vect(0,0,38));
    s.RemoteRole = ROLE_None;
    destroy();
}
    

auto state Flying
{
    simulated function ProcessTouch (Actor Other, Vector HitLocation)
    {
        local vector momentum;
    
        if ( (Krall(Other) == None) && (KraalBolt(Other) == None))
        {
            if ( Role == ROLE_Authority )
            {
                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));
}

defaultproperties
{
     speed=800.000000
     MaxSpeed=800.000000
     Damage=15.000000
     MomentumTransfer=10000
     SpawnSound=Sound'UnrealI.Krall.Krasht2'
     RemoteRole=ROLE_SimulatedProxy
     LifeSpan=7.500000
     Mesh=LodMesh'UnrealI.Krallbm'
     AmbientGlow=255
     bUnlit=True
     LightType=LT_Steady
     LightEffect=LE_NonIncidence
     LightBrightness=200
     LightHue=102
     LightRadius=4
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: za 22-4-2006 13:06:32.000 - Creation time: za 22-4-2006 13:07:26.093 - Created with UnCodeX