UnrealI
Class Invisibility

source: e:\games\UnrealTournament\UnrealI\Classes\Invisibility.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Inventory
         |
         +--Engine.Pickup
            |
            +--UnrealI.Invisibility
Direct Known Subclasses:None

class Invisibility
extends Engine.Pickup

//============================================================================= // Invisibility. //=============================================================================
Variables
 byte TempVis

States
DeActivated, Activated

Function Summary
 void Invisibility(bool Vis)


State DeActivated Function Summary


State Activated Function Summary
 void BeginState()
 void Timer()
 void endstate()



Source Code


00001	//=============================================================================
00002	// Invisibility.
00003	//=============================================================================
00004	class Invisibility expands PickUp;
00005	
00006	#exec TEXTURE IMPORT NAME=I_Invisibility FILE=TEXTURES\HUD\i_Invis.PCX GROUP="Icons" MIPS=OFF
00007	
00008	#exec AUDIO IMPORT FILE="..\UnrealShare\Sounds\Pickups\Scloak1.WAV" NAME="Invisible" GROUP="Pickups"
00009	
00010	#exec MESH IMPORT MESH=InvisibilityMesh ANIVFILE=MODELS\Invis_a.3D DATAFILE=MODELS\Invis_d.3D X=0 Y=0 Z=0
00011	#exec MESH ORIGIN MESH=InvisibilityMesh X=0 Y=0 Z=-15
00012	#exec MESH SEQUENCE MESH=InvisibilityMesh SEQ=All    STARTFRAME=0   NUMFRAMES=1
00013	#exec MESH SEQUENCE MESH=InvisibilityMesh SEQ=Still  STARTFRAME=0   NUMFRAMES=1
00014	#exec TEXTURE IMPORT NAME=JInvisibility1 FILE=MODELS\Invis.PCX GROUP=Skins 
00015	#exec OBJ LOAD FILE=..\UnrealShare\Textures\fireeffect26.utx  PACKAGE=UNREALI.Effect26
00016	#exec MESHMAP SCALE MESHMAP=InvisibilityMesh X=0.05 Y=0.05 Z=0.1
00017	#exec MESHMAP SETTEXTURE MESHMAP=InvisibilityMesh NUM=1 TEXTURE=JInvisibility1
00018	#exec MESHMAP SETTEXTURE MESHMAP=InvisibilityMesh NUM=0 TEXTURE=Unreali.Effect26.FireEffect26
00019	
00020	var byte TempVis;
00021	
00022	
00023	function Invisibility (bool Vis)
00024	{ 
00025		if (Pawn(Owner)==None) Return;
00026	
00027		if( Vis )
00028		{
00029			PlaySound(ActivateSound,,4.0);
00030			if ( PlayerPawn(Owner) != None )		
00031				PlayerPawn(Owner).ClientAdjustGlow(-0.15, vect(156.25,156.25,351.625));
00032			Pawn(Owner).Visibility = 10;
00033			Pawn(Owner).bHidden=True;
00034			if ( Pawn(Owner).Weapon != None )
00035				Pawn(Owner).Weapon.bOnlyOwnerSee=False;			
00036		}
00037		else
00038		{
00039			PlaySound(DeActivateSound);
00040			if ( PlayerPawn(Owner) != None )		
00041				PlayerPawn(Owner).ClientAdjustGlow(0.15, vect(-156.25,-156.25,-351.625));	
00042			Pawn(Owner).Visibility = Pawn(Owner).Default.Visibility;
00043			if ( Pawn(Owner).health > 0 )
00044				Pawn(Owner).bHidden=False;
00045			if ( Pawn(Owner).Weapon != None )
00046				Pawn(Owner).Weapon.bOnlyOwnerSee=True;
00047		}
00048	}
00049	
00050	state Activated
00051	{
00052		function endstate()
00053		{
00054			Invisibility(False);
00055			bActive = false;		
00056		}
00057	
00058		function Timer()
00059		{
00060			Charge -= 1;
00061			Owner.bHidden=True;		
00062			Pawn(Owner).Visibility = 10;		
00063			if (Charge<-0) 
00064			{	
00065				Pawn(Owner).ClientMessage(ExpireMessage);	
00066				UsedUp();
00067			}
00068		}
00069	
00070		function BeginState()
00071		{
00072			Invisibility(True);
00073			SetTimer(0.5,True);
00074		}
00075	}
00076	
00077	state DeActivated
00078	{
00079	Begin:
00080	}
00081	
00082	defaultproperties
00083	{
00084	     ExpireMessage="Invisibility has worn off."
00085	     bAutoActivate=True
00086	     bActivatable=True
00087	     bDisplayableInv=True
00088	     PickupMessage="You have Invisibility"
00089	     RespawnTime=100.000000
00090	     PickupViewMesh=LodMesh'UnrealI.InvisibilityMesh'
00091	     Charge=100
00092	     MaxDesireability=1.200000
00093	     PickupSound=Sound'UnrealShare.Pickups.GenPickSnd'
00094	     ActivateSound=Sound'UnrealI.Pickups.Invisible'
00095	     Icon=Texture'UnrealI.Icons.I_Invisibility'
00096	     RemoteRole=ROLE_DumbProxy
00097	     Mesh=LodMesh'UnrealI.InvisibilityMesh'
00098	     AmbientGlow=96
00099	     CollisionRadius=15.000000
00100	     CollisionHeight=17.000000
00101	}

End Source Code