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

Botpack.UT_Invisibility


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
//=============================================================================
// UT_Invisibility.
//=============================================================================
class UT_Invisibility extends TournamentPickUp;


#exec MESH IMPORT MESH=invis2M ANIVFILE=MODELS\invis_a.3D DATAFILE=MODELS\invis_d.3D X=0 Y=0 Z=0
#exec MESH LODPARAMS MESH=invis2M STRENGTH=0.5
#exec MESH ORIGIN MESH=invis2M X=0 Y=0 Z=0  YAW=0
#exec MESH SEQUENCE MESH=invis2M SEQ=All    STARTFRAME=0  NUMFRAMES=1
//#exec OBJ LOAD FILE=..\Textures\belt_fx.utx  PACKAGE=botpack.belt_fx
#exec TEXTURE IMPORT NAME=jinvis FILE=MODELS\invis2.pcx GROUP=Skins  LODSET=2
#exec MESHMAP SCALE MESHMAP=invis2M X=0.05 Y=0.05 Z=0.1
#exec MESHMAP SETTEXTURE MESHMAP=invis2M NUM=1 TEXTURE=jinvis




state Activated
{
    function endstate()
    {
        local Inventory S;

        bActive = false;        
        PlaySound(DeActivateSound);

        Owner.SetDefaultDisplayProperties();
        S = Pawn(Owner).FindInventoryType(class'UT_ShieldBelt');
        if ( (S != None) && (UT_Shieldbelt(S).MyEffect != None) )
            UT_Shieldbelt(S).MyEffect.bHidden = false;
    }

    function Activate()
    {
        bActive = true;
        SetOwnerDisplay();
    }

    function SetOwnerDisplay()
    {
        if ( !bActive )
            return;
        Owner.SetDisplayProperties(ERenderStyle.STY_Translucent, 
                             FireTexture'unrealshare.Belt_fx.Invis',
                             true,
                             true);
        if( Inventory != None )
            Inventory.SetOwnerDisplay();
    }

    function ChangedWeapon()
    {
        if ( !bActive )
            return;
        if( Inventory != None )
            Inventory.ChangedWeapon();

        // Make new weapon invisible.
        if ( Pawn(Owner).Weapon != None )
            Pawn(Owner).Weapon.SetDisplayProperties(ERenderStyle.STY_Translucent, 
                                     FireTexture'Unrealshare.Belt_fx.Invis',
                                     true,
                                     true);
    }

    function Timer()
    {
        Charge -= 1;
        Pawn(Owner).Visibility = 10;
        if (Charge<-0)
            UsedUp();
    }

    function BeginState()
    {
        local Inventory S;

        bActive = true;
        PlaySound(ActivateSound,,4.0);

        Owner.SetDisplayProperties(ERenderStyle.STY_Translucent, 
                                   FireTexture'unrealshare.Belt_fx.Invis',
                                   false,
                                   true);
        SetTimer(0.5,True);
        S = Pawn(Owner).FindInventoryType(class'UT_ShieldBelt');
        if ( (S != None) && (UT_Shieldbelt(S).MyEffect != None) )
            UT_Shieldbelt(S).MyEffect.bHidden = true;
    }
}

state DeActivated
{
Begin:
}

defaultproperties
{
     ExpireMessage="Invisibility has worn off."
     bAutoActivate=True
     bActivatable=True
     bDisplayableInv=True
     PickupMessage="You have Invisibility."
     ItemName="Invisibility"
     RespawnTime=120.000000
     PickupViewMesh=LodMesh'Botpack.invis2M'
     Charge=100
     MaxDesireability=1.200000
     PickupSound=Sound'UnrealShare.Pickups.GenPickSnd'
     ActivateSound=Sound'UnrealI.Pickups.Invisible'
     RemoteRole=ROLE_DumbProxy
     Texture=FireTexture'UnrealShare.Belt_fx.Invis.Invis'
     Mesh=LodMesh'Botpack.invis2M'
     CollisionRadius=15.000000
     CollisionHeight=20.000000
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Do 19.5.2005 19:42:14.000 - Creation time: Fr 7.6.2013 13:16:21.497 - Created with UnCodeX