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

UnrealI.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
//=============================================================================
// Invisibility.
//=============================================================================
class Invisibility expands PickUp;

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

#exec AUDIO IMPORT FILE="..\UnrealShare\Sounds\Pickups\Scloak1.WAV" NAME="Invisible" GROUP="Pickups"

#exec MESH IMPORT MESH=InvisibilityMesh ANIVFILE=MODELS\Invis_a.3D DATAFILE=MODELS\Invis_d.3D X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=InvisibilityMesh X=0 Y=0 Z=-15
#exec MESH SEQUENCE MESH=InvisibilityMesh SEQ=All    STARTFRAME=0   NUMFRAMES=1
#exec MESH SEQUENCE MESH=InvisibilityMesh SEQ=Still  STARTFRAME=0   NUMFRAMES=1
#exec TEXTURE IMPORT NAME=JInvisibility1 FILE=MODELS\Invis.PCX GROUP=Skins 
#exec OBJ LOAD FILE=..\UnrealShare\Textures\fireeffect26.utx  PACKAGE=UNREALI.Effect26
#exec MESHMAP SCALE MESHMAP=InvisibilityMesh X=0.05 Y=0.05 Z=0.1
#exec MESHMAP SETTEXTURE MESHMAP=InvisibilityMesh NUM=1 TEXTURE=JInvisibility1
#exec MESHMAP SETTEXTURE MESHMAP=InvisibilityMesh NUM=0 TEXTURE=Unreali.Effect26.FireEffect26

var byte TempVis;


function Invisibility (bool Vis)
{ 
    if (Pawn(Owner)==None) Return;

    if( Vis )
    {
        PlaySound(ActivateSound,,4.0);
        if ( PlayerPawn(Owner) != None )        
            PlayerPawn(Owner).ClientAdjustGlow(-0.15, vect(156.25,156.25,351.625));
        Pawn(Owner).Visibility = 10;
        Pawn(Owner).bHidden=True;
        if ( Pawn(Owner).Weapon != None )
            Pawn(Owner).Weapon.bOnlyOwnerSee=False;         
    }
    else
    {
        PlaySound(DeActivateSound);
        if ( PlayerPawn(Owner) != None )        
            PlayerPawn(Owner).ClientAdjustGlow(0.15, vect(-156.25,-156.25,-351.625));   
        Pawn(Owner).Visibility = Pawn(Owner).Default.Visibility;
        if ( Pawn(Owner).health > 0 )
            Pawn(Owner).bHidden=False;
        if ( Pawn(Owner).Weapon != None )
            Pawn(Owner).Weapon.bOnlyOwnerSee=True;
    }
}

state Activated
{
    function endstate()
    {
        Invisibility(False);
        bActive = false;        
    }

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

    function BeginState()
    {
        Invisibility(True);
        SetTimer(0.5,True);
    }
}

state DeActivated
{
Begin:
}

defaultproperties
{
     ExpireMessage="Invisibility has worn off."
     bAutoActivate=True
     bActivatable=True
     bDisplayableInv=True
     PickupMessage="You have Invisibility"
     RespawnTime=100.000000
     PickupViewMesh=LodMesh'UnrealI.InvisibilityMesh'
     Charge=100
     MaxDesireability=1.200000
     PickupSound=Sound'UnrealShare.Pickups.GenPickSnd'
     ActivateSound=Sound'UnrealI.Pickups.Invisible'
     Icon=Texture'UnrealI.Icons.I_Invisibility'
     RemoteRole=ROLE_DumbProxy
     Mesh=LodMesh'UnrealI.InvisibilityMesh'
     AmbientGlow=96
     CollisionRadius=15.000000
     CollisionHeight=17.000000
}

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