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 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 00140 00141 |
//============================================================================= // Weapon_LinkTurret //============================================================================= // Created by Laurent Delayen // © 2003, Epic Games, Inc. All Rights Reserved //============================================================================= class Weapon_LinkTurret extends LinkGun config(user) HideDropDown CacheExempt; #exec OBJ LOAD FILE=..\Animations\AS_VehiclesFull_M.ukx simulated function UpdateLinkColor( LinkAttachment.ELinkColor Color ) { if ( FireMode[1] != None ) LinkFire(FireMode[1]).UpdateLinkColor( Color ); switch ( Color ) { case LC_Gold : Skins[2] = material'PowerPulseShaderYellow'; break; case LC_Green : Skins[2] = material'PowerPulseShader'; break; case LC_Red : Skins[2] = material'PowerPulseShaderRed'; break; case LC_Blue : Skins[2] = material'PowerPulseShaderBlue'; break; } Skins[0] = Combiner'AS_Weapons_TX.LinkTurret.LinkTurret_Skin1_C'; } simulated function vector GetEffectStart() { return ASVehicle(Instigator).GetFireStart(); } simulated function IncrementFlashCount(int mode) { super(Weapon).IncrementFlashCount( mode ); if ( ThirdPersonActor != None && LinkAttachment(ThirdPersonActor) != None ) LinkAttachment(ThirdPersonActor).Links = Links; } simulated function PawnUnpossessed() { if ( Instigator != None && PlayerController(Instigator.Controller) != None ) PlayerController(Instigator.Controller).DesiredFOV = PlayerController(Instigator.Controller).DefaultFOV; // If was linking to somebody, unlink... if ( ThirdPersonActor != None && LinkAttachment(ThirdPersonActor).LinkColor != LC_Gold ) LinkAttachment(ThirdPersonActor).SetLinkColor( LC_Green ); super.PawnUnpossessed(); } /* BestMode() choose between regular or alt-fire */ function byte BestMode() { local float EnemyDist; local bot B; //local Controller C; B = Bot(Instigator.Controller); if ( B == None ) { return 0; /* C = Instigator.Controller; if ( C.Enemy == None || C.Enemy.IsA('Vehicle') || VSize(C.Enemy.Location - C.Pawn.Location) > LinkFire(FireMode[1]).TraceRange ) return 0; return 1; */ } if ( DestroyableObjective(B.Squad.SquadObjective) != None && DestroyableObjective(B.Squad.SquadObjective).TeamLink(B.GetTeamNum()) && VSize(B.Squad.SquadObjective.Location - B.Pawn.Location) < FireMode[1].MaxRange() && (B.Enemy == None || !B.CanSee(B.Enemy)) ) return 1; if ( FocusOnLeader(B.Focus == B.Squad.SquadLeader.Pawn) ) { B.Focus = B.Squad.SquadLeader.Pawn; return 1; } if ( B.Enemy == None ) return 0; EnemyDist = VSize(B.Enemy.Location - Instigator.Location); if ( EnemyDist > LinkFire(FireMode[1]).TraceRange ) return 0; return 1; } simulated event WeaponTick(float dt) { if ( (FireMode[1] != None) && !FireMode[1].bIsFiring && (ThirdPersonActor != None) ) { if ( Links > 0 ) LinkAttachment(ThirdPersonActor).SetLinkColor( LC_Gold ); else LinkAttachment(ThirdPersonActor).SetLinkColor( LC_Green ); } else if ( Level.NetMode != NM_DedicatedServer && ThirdPersonActor != None ) LinkAttachment(ThirdPersonActor).UpdateLinkColor(); super.WeaponTick( dt ); } //============================================================================= // defaultproperties //============================================================================= defaultproperties { FireModeClass(0)=Class'UT2k4AssaultFull.FM_LinkTurret_Fire' FireModeClass(1)=Class'UT2k4AssaultFull.FM_LinkTurret_AltFire' SelectSound=None bCanThrow=Falsch bNoInstagibReplace=Wahr OldMesh=None OldPickup= EffectOffset=(X=0.000000,Y=0.000000,Z=0.000000) DisplayFOV=90.000000 Priority=1 SmallViewOffset=(X=-25.000000,Z=-160.000000) CenteredRoll=0 InventoryGroup=1 PickupClass=None PlayerViewOffset=(X=-25.000000,Y=0.000000,Z=-160.000000) PlayerViewPivot=(Yaw=0) AttachmentClass=Class'UT2k4AssaultFull.WA_LinkTurret' IconMaterial=None ItemName="Turret weapon" Mesh=SkeletalMesh'AS_VehiclesFull_M.LinkTurret_FP' DrawScale=0.750000 AmbientGlow=64 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |