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

UnrealShare.Stinger


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
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
//=============================================================================
// Stinger.
//=============================================================================
class Stinger expands Weapon;

#exec MESH IMPORT MESH=StingerM ANIVFILE=MODELS\aniv51.3D DATAFILE=MODELS\data51.3D X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=StingerM X=0 Y=0 Z=0 YAW=64
#exec MESH SEQUENCE MESH=StingerM SEQ=All  STARTFRAME=0  NUMFRAMES=44
#exec MESH SEQUENCE MESH=StingerM SEQ=Select  STARTFRAME=0  NUMFRAMES=21 GROUP=Select
#exec MESH SEQUENCE MESH=StingerM SEQ=Still STARTFRAME=21  NUMFRAMES=1
#exec MESH SEQUENCE MESH=StingerM SEQ=Down  STARTFRAME=22  NUMFRAMES=11
#exec MESH SEQUENCE MESH=StingerM SEQ=FireOne STARTFRAME=33  NUMFRAMES=3
#exec MESH SEQUENCE MESH=StingerM SEQ=FireThree STARTFRAME=36  NUMFRAMES=7

#exec TEXTURE IMPORT NAME=SpikHand1 FILE=MODELS\Spikegun.PCX GROUP="Skins"
#exec OBJ LOAD FILE=Textures\FireEffect18.utx PACKAGE=UnrealShare.Effect18
#exec MESHMAP SCALE MESHMAP=StingerM X=0.005 Y=0.005 Z=0.01
#exec MESHMAP SETTEXTURE MESHMAP=StingerM NUM=1 TEXTURE=SpikHand1
#exec MESHMAP SETTEXTURE MESHMAP=StingerM NUM=0 TEXTURE=UnrealShare.Effect18.FireEffect18
 
#exec MESH IMPORT MESH=StingerPickup ANIVFILE=MODELS\aniv55.3D DATAFILE=MODELS\data55.3D X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=StingerPickup X=100 Y=-100 Z=0 YAW=0 PITCH=0
#exec MESH SEQUENCE MESH=StingerPickup SEQ=All  STARTFRAME=0  NUMFRAMES=1
#exec MESH SEQUENCE MESH=StingerPickup SEQ=Still STARTFRAME=0  NUMFRAMES=1
#exec TEXTURE IMPORT NAME=Sting1 FILE=MODELS\spikegun.PCX GROUP="Skins"
#exec MESHMAP SCALE MESHMAP=StingerPickup X=0.03 Y=0.03 Z=0.06
#exec MESHMAP SETTEXTURE MESHMAP=StingerPickup NUM=1 TEXTURE=Sting1

#exec MESH IMPORT MESH=Stinger3rd ANIVFILE=MODELS\Sting3_a.3D DATAFILE=MODELS\Sting3_d.3D X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=Stinger3rd X=0 Y=320 Z=-50 YAW=-64 ROLL=119 PITCH=128
#exec MESH SEQUENCE MESH=Stinger3rd SEQ=All  STARTFRAME=0  NUMFRAMES=6
#exec MESH SEQUENCE MESH=Stinger3rd SEQ=Still  STARTFRAME=0  NUMFRAMES=1
#exec MESH SEQUENCE MESH=Stinger3rd SEQ=FireOne  STARTFRAME=1  NUMFRAMES=5
#exec TEXTURE IMPORT NAME=JSting2 FILE=MODELS\sting3.PCX GROUP="Skins"
#exec OBJ LOAD FILE=textures\FireEffect18.utx PACKAGE=UnrealShare.Effect18
#exec MESHMAP SCALE MESHMAP=Stinger3rd X=0.035 Y=0.035 Z=0.07
#exec MESHMAP SETTEXTURE MESHMAP=Stinger3rd NUM=1 TEXTURE=JSting2
#exec MESHMAP SETTEXTURE MESHMAP=Stinger3rd NUM=0 TEXTURE=UnrealShare.Effect18.FireEffect18

#exec AUDIO IMPORT FILE="Sounds\stinger\sshot10d.WAV" NAME="StingerFire" GROUP="Stinger"
#exec AUDIO IMPORT FILE="Sounds\stinger\sshot20d.WAV" NAME="StingerTwoFire" GROUP="Stinger"
#exec AUDIO IMPORT FILE="Sounds\stinger\saltf1.WAV" NAME="StingerAltFire" GROUP="Stinger"
#exec AUDIO IMPORT FILE="Sounds\stinger\load1.WAV" NAME="StingerLoad" GROUP="Stinger"
#exec AUDIO IMPORT FILE="Sounds\stinger\Ends1.WAV" NAME="EndFire" GROUP="Stinger"

var bool bAlreadyFiring;

function float RateSelf( out int bUseAltMode )
{
    local float EnemyDist;

    if ( AmmoType.AmmoAmount <=0 )
        return -2;
    if ( Pawn(Owner).Enemy == None )
    {
        bUseAltMode = 0;
        return AIRating;
    }

    EnemyDist = VSize(Pawn(Owner).Enemy.Location - Owner.Location);
    bUseAltMode = int( 600 * FRand() > EnemyDist - 140 );
    return AIRating;
}

function PlayFiring()
{
    if ( bAlreadyFiring )
    {
        AmbientSound = sound'StingerTwoFire';
        SoundVolume = Pawn(Owner).SoundDampening*255;
        LoopAnim( 'FireOne', 0.7);      
    }
    else
    {
        Owner.PlaySound(FireSound, SLOT_Misc,2.0*Pawn(Owner).SoundDampening);
        PlayAnim( 'FireOne', 0.7 );     
    }
    bAlreadyFiring = true;
    bWarnTarget = (FRand() < 0.2);
}

function PlayAltFiring()
{
    Owner.PlaySound(AltFireSound, SLOT_Misc,2.0*Pawn(Owner).SoundDampening);        
    PlayAnim( 'FireOne', 0.6 );
}

///////////////////////////////////////////////////////
state NormalFire
{

    function Tick( float DeltaTime )
    {
        if (Owner==None) AmbientSound=None;     
    }

    function EndState()
    {
        if (AmbientSound!=None && Owner!=None) Owner.PlaySound(Misc1Sound, SLOT_Misc,2.0*Pawn(Owner).SoundDampening);       
        AmbientSound = None;        
        bAlreadyFiring = false;
        Super.EndState();
    }

Begin:
    Sleep(0.2);
    SetLocation(Owner.Location);    
    Finish();
}

///////////////////////////////////////////////////////////////
state AltFiring
{
    function Projectile ProjectileFire(class<projectile> ProjClass, float ProjSpeed, bool bWarn)
    {
        local Projectile S;
        local int i;
        local vector Start,X,Y,Z;
        local Rotator StartRot, AltRotation;

        S = Global.ProjectileFire(ProjClass, ProjSpeed, bWarn);
        StartRot = S.Rotation;
        Start = S.Location;
        for (i = 0; i< 4; i++)
        {
            if (AmmoType.UseAmmo(1)) 
            {
                AltRotation = StartRot;
                AltRotation.Pitch += FRand()*3000-1500;
                AltRotation.Yaw += FRand()*3000-1500;
                AltRotation.Roll += FRand()*9000-4500;              
                S = Spawn(AltProjectileClass,,, Start - 2 * VRand(), AltRotation);
            }
        }
        StingerProjectile(S).bLighting = True;
    }

Begin:
    FinishAnim();   
    PlayAnim('Still');
    Sleep(1.0);
    Finish();           
}

///////////////////////////////////////////////////////////
function PlayIdleAnim()
{
    PlayAnim('Still');
}

defaultproperties
{
     AmmoName=Class'UnrealShare.StingerAmmo'
     PickupAmmoCount=40
     bAltWarnTarget=True
     FireOffset=(X=12.000000,Y=-10.000000,Z=-15.000000)
     ProjectileClass=Class'UnrealShare.StingerProjectile'
     AltProjectileClass=Class'UnrealShare.StingerProjectile'
     shakemag=120.000000
     AIRating=0.400000
     RefireRate=0.800000
     FireSound=Sound'UnrealShare.Stinger.StingerFire'
     AltFireSound=Sound'UnrealShare.Stinger.StingerAltFire'
     SelectSound=Sound'UnrealShare.Stinger.StingerLoad'
     Misc1Sound=Sound'UnrealShare.Stinger.EndFire'
     DeathMessage="%o was perforated by %k's %w."
     AutoSwitchPriority=3
     InventoryGroup=3
     PickupMessage="You picked up the Stinger"
     ItemName="Stinger"
     PlayerViewOffset=(X=4.200000,Y=-3.000000,Z=-4.000000)
     PlayerViewMesh=Mesh'UnrealShare.StingerM'
     PlayerViewScale=1.700000
     PickupViewMesh=Mesh'UnrealShare.StingerPickup'
     ThirdPersonMesh=Mesh'UnrealShare.Stinger3rd'
     PickupSound=Sound'UnrealShare.Pickups.WeaponPickup'
     Mesh=Mesh'UnrealShare.StingerPickup'
     bNoSmooth=False
     bMeshCurvy=False
     SoundRadius=64
     SoundVolume=255
     CollisionRadius=27.000000
     CollisionHeight=8.000000
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Sun 21/2/2010 23:48:40.000 - Creation time: Sun 21/2/2010 23:49:53.817 - Created with UnCodeX