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

UnrealShare.RocketCan


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
//=============================================================================
// RocketCan.
//=============================================================================
class RocketCan expands Ammo;

#exec AUDIO IMPORT FILE="Sounds\Pickups\AMMOPUP1.WAV" NAME="AmmoSnd"       GROUP="Pickups"

#exec TEXTURE IMPORT NAME=I_RocketAmmo FILE=TEXTURES\HUD\i_rcan.PCX GROUP="Icons" MIPS=OFF

#exec MESH IMPORT MESH=RocketCanMesh ANIVFILE=MODELS\pshell_a.3D DATAFILE=MODELS\pshell_d.3D X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=RocketCanMesh X=0 Y=0 Z=-15 YAW=0
#exec MESH SEQUENCE MESH=RocketCanMesh SEQ=All    STARTFRAME=0  NUMFRAMES=10
#exec MESH SEQUENCE MESH=RocketCanMesh SEQ=Open   STARTFRAME=0  NUMFRAMES=10
#exec TEXTURE IMPORT NAME=JRocketCan1 FILE=MODELS\RocketCn.PCX GROUP="Skins"
#exec MESHMAP SCALE MESHMAP=RocketCanMesh X=0.06 Y=0.06 Z=0.12
#exec MESHMAP SETTEXTURE MESHMAP=RocketCanMesh NUM=1 TEXTURE=JRocketCan1

var bool bOpened;

auto state Pickup
{
    function Touch( Actor Other )
    {
        local Vector Dist2D;

        if ( bOpened )
        {
            Super.Touch(Other);
            return;
        }   
        if ( (Pawn(Other) == None) || !Pawn(Other).bIsPlayer )
            return;
        Dist2D = Other.Location - Location;
        Dist2D.Z = 0;
        if ( VSize(Dist2D) <= 48.0 )
            Super.Touch(Other);
        else if ( !bOpened )
        {
            SetCollisionSize(27.0, CollisionHeight);
            SetLocation(Location); //to force untouch
            bOpened = true;
            PlayAnim('Open', 0.1);
        }
    }

    function Landed(vector HitNormal)
    {
        Super.Landed(HitNormal);
        if ( !bOpened )
        {
            bCollideWorld = false;
            SetCollisionSize(172,CollisionHeight);
        }
    }
}

defaultproperties
{
     AmmoAmount=12
     MaxAmmo=48
     UsedInWeaponSlot(5)=1
     PickupMessage="You picked up 12 Eightballs"
     PickupViewMesh=Mesh'UnrealShare.RocketCanMesh'
     MaxDesireability=0.300000
     PickupSound=Sound'UnrealShare.Pickups.AmmoSnd'
     Icon=Texture'UnrealShare.Icons.I_RocketAmmo'
     Physics=PHYS_Falling
     Mesh=Mesh'UnrealShare.RocketCanMesh'
     bMeshCurvy=False
     CollisionRadius=27.000000
     CollisionHeight=12.000000
     bCollideActors=True
}

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.365 - Created with UnCodeX