Core.Object | +--Engine.Actor | +--Engine.Inventory | +--Engine.Pickup | +--Botpack.TournamentPickup | +--Botpack.UT_Invisibility
void
BeginState()
Timer()
ChangedWeapon()
SetOwnerDisplay()
Activate()
endstate()
00001 //============================================================================= 00002 // UT_Invisibility. 00003 //============================================================================= 00004 class UT_Invisibility extends TournamentPickUp; 00005 00006 00007 #exec MESH IMPORT MESH=invis2M ANIVFILE=MODELS\invis_a.3D DATAFILE=MODELS\invis_d.3D X=0 Y=0 Z=0 00008 #exec MESH LODPARAMS MESH=invis2M STRENGTH=0.5 00009 #exec MESH ORIGIN MESH=invis2M X=0 Y=0 Z=0 YAW=0 00010 #exec MESH SEQUENCE MESH=invis2M SEQ=All STARTFRAME=0 NUMFRAMES=1 00011 //#exec OBJ LOAD FILE=..\Textures\belt_fx.utx PACKAGE=botpack.belt_fx 00012 #exec TEXTURE IMPORT NAME=jinvis FILE=MODELS\invis2.pcx GROUP=Skins LODSET=2 00013 #exec MESHMAP SCALE MESHMAP=invis2M X=0.05 Y=0.05 Z=0.1 00014 #exec MESHMAP SETTEXTURE MESHMAP=invis2M NUM=1 TEXTURE=jinvis 00015 00016 00017 00018 00019 state Activated 00020 { 00021 function endstate() 00022 { 00023 local Inventory S; 00024 00025 bActive = false; 00026 PlaySound(DeActivateSound); 00027 00028 Owner.SetDefaultDisplayProperties(); 00029 S = Pawn(Owner).FindInventoryType(class'UT_ShieldBelt'); 00030 if ( (S != None) && (UT_Shieldbelt(S).MyEffect != None) ) 00031 UT_Shieldbelt(S).MyEffect.bHidden = false; 00032 } 00033 00034 function Activate() 00035 { 00036 bActive = true; 00037 SetOwnerDisplay(); 00038 } 00039 00040 function SetOwnerDisplay() 00041 { 00042 if ( !bActive ) 00043 return; 00044 Owner.SetDisplayProperties(ERenderStyle.STY_Translucent, 00045 FireTexture'unrealshare.Belt_fx.Invis', 00046 true, 00047 true); 00048 if( Inventory != None ) 00049 Inventory.SetOwnerDisplay(); 00050 } 00051 00052 function ChangedWeapon() 00053 { 00054 if ( !bActive ) 00055 return; 00056 if( Inventory != None ) 00057 Inventory.ChangedWeapon(); 00058 00059 // Make new weapon invisible. 00060 if ( Pawn(Owner).Weapon != None ) 00061 Pawn(Owner).Weapon.SetDisplayProperties(ERenderStyle.STY_Translucent, 00062 FireTexture'Unrealshare.Belt_fx.Invis', 00063 true, 00064 true); 00065 } 00066 00067 function Timer() 00068 { 00069 Charge -= 1; 00070 Pawn(Owner).Visibility = 10; 00071 if (Charge<-0) 00072 UsedUp(); 00073 } 00074 00075 function BeginState() 00076 { 00077 local Inventory S; 00078 00079 bActive = true; 00080 PlaySound(ActivateSound,,4.0); 00081 00082 Owner.SetDisplayProperties(ERenderStyle.STY_Translucent, 00083 FireTexture'unrealshare.Belt_fx.Invis', 00084 false, 00085 true); 00086 SetTimer(0.5,True); 00087 S = Pawn(Owner).FindInventoryType(class'UT_ShieldBelt'); 00088 if ( (S != None) && (UT_Shieldbelt(S).MyEffect != None) ) 00089 UT_Shieldbelt(S).MyEffect.bHidden = true; 00090 } 00091 } 00092 00093 state DeActivated 00094 { 00095 Begin: 00096 } 00097 00098 defaultproperties 00099 { 00100 ExpireMessage="Invisibility has worn off." 00101 bAutoActivate=True 00102 bActivatable=True 00103 bDisplayableInv=True 00104 PickupMessage="You have Invisibility." 00105 ItemName="Invisibility" 00106 RespawnTime=120.000000 00107 PickupViewMesh=LodMesh'Botpack.invis2M' 00108 Charge=100 00109 MaxDesireability=1.200000 00110 PickupSound=Sound'UnrealShare.Pickups.GenPickSnd' 00111 ActivateSound=Sound'UnrealI.Pickups.Invisible' 00112 RemoteRole=ROLE_DumbProxy 00113 Texture=FireTexture'UnrealShare.Belt_fx.Invis.Invis' 00114 Mesh=LodMesh'Botpack.invis2M' 00115 CollisionRadius=15.000000 00116 CollisionHeight=20.000000 00117 }