Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
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 00119 |
//============================================================================= // $Workfile: Artifact.uc $ // Created By: Mark Poesch // Created On: 6/22/2001 // $Author: Aleiby $ // $Date: 7/26/02 4:31p $ // $Revision: 7 $ //============================================================================= class Artifact extends U2Inventory abstract; #exec OBJ LOAD File=..\Sounds\U2XMPA.uax var() int TeamNumber; // track ownership var bool bActive; // true while Artifact is able to affect the Owner var string ArtifactIconName; function bool HandlePickupQuery( Pickup Item ) { // only allow one Artifact to be carried at a time in XMP games if( U2XMPGame(Level.Game) != None && ClassIsChildOf( Item.InventoryType, class'Artifact' ) ) return true; if( Inventory == None ) return false; return Inventory.HandlePickupQuery( Item ); } function TransferProperties( Pickup Item ) { assert( ArtifactPickup(Item) != None ); TeamNumber = ArtifactPickup(Item).TeamNumber; } function TransferPropertiesTo( Pickup Item ) { assert( ArtifactPickup(Item) != None ); ArtifactPickup(Item).TeamNumber = TeamNumber; if( U2TeamGame(Level.Game).ValidTeam( TeamNumber ) ) { Item.SetDrawScale( Item.default.DrawScale * 0.3 ); //TBR test hack } } function bool IsRegistered( int InTeamNumber ) { //DM( self $".IsRegistered() " @ InTeam @ Team ); return TeamNumber == InTeamNumber; } function Register( int InTeamNumber ) { //DM( self $".Register( " $ InTeamNumber $ " )" ); U2XMPGame(Level.Game).Register( Self, InTeamNumber ); assert( Pawn(Owner) != None ); BeginEffect( Pawn(Owner) ); bActive = true; } function NotifyAddInventory( Pawn Other ) { if( Level.NetMode == NM_Standalone ) { BeginEffect( Other ); bActive = true; } else { if( IsRegistered( Other.GetTeam() ) ) { BeginEffect( Other ); bActive = true; } } } function NotifyDeleteInventory( Pawn Other ) { if( bActive ) { EndEffect( Other ); bActive = false; } } // override to apply effects to the Owner function BeginEffect( Pawn Other ) { Other.PlaySound( ActivateSound, SLOT_None ); class'UIConsole'.static.SendEvent("ArtifactTrayShow"); class'UIConsole'.static.SendEvent( ArtifactIconName ); } // override to remove effects from the Owner function EndEffect( Pawn Other ) { Other.PlaySound( DeActivateSound, SLOT_None ); class'UIConsole'.static.SendEvent("ArtifactTrayHide"); } defaultproperties { TeamNumber=255 bTravel=false UseReticleOnEvents(0)="UseReticleText" UseReticleOnEvents(1)="UseReticleCorners" UseReticleOnEvents(2)="UseReticleTopBars" ProximityReticleOnEvents(0)="ProximityReticleCorners" ProximityReticleOnEvents(1)="ProximityReticleTopBars" } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |