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 |
//============================================================================= // SkaarjHeavyController.uc // Created By: Mike Fox // Created On: 8/01/00 // $Author: Mfox $ // $Date: 12/03/02 1:15a $ // $Revision: 6 $ //============================================================================= class SkaarjHeavyController extends SkaarjController; //----------------------------------------------------------------------------- var() float SingleShotOdds; //----------------------------------------------------------------------------- var U2SkaarjHeavy U2SH; var bool bSingleShot; var int MultiShotCount; var int NumMultiShots, NumSingleShots; //----------------------------------------------------------------------------- function Possess( Pawn P ) { U2SH = U2SkaarjHeavy(P); Super.Possess( P ); } //----------------------------------------------------------------------------- function vector GetTargetLocation( Actor TargetActor, bool bLOSToTarget, bool bTossed, vector LastEnemySeenLocation, float TimeSinceLastSeen ) { local vector PawnTargetVector; local vector ReturnedLocation; if( bSingleShot ) { ReturnedLocation = TargetActor.Location; } else { MultiShotCount++; if( MultiShotCount > 5 ) MultiShotCount = 1; ReturnedLocation = TargetActor.Location; // center if( MultiShotCount == 2 ) { ReturnedLocation.Z += 0.8*TargetActor.CollisionHeight; // target head } else if( MultiShotCount == 3 ) { ReturnedLocation.Z -= (TargetActor.CollisionHeight + CCFloatHeight); // target feet } else if( MultiShotCount >= 4 ) { ReturnedLocation.Z -= (TargetActor.CollisionHeight + CCFloatHeight); // target feet PawnTargetVector = TargetActor.Location - Pawn.Location; PawnTargetVector.Z = 0; PawnTargetVector = Normal( PawnTargetVector ); if( MultiShotCount == 4 ) { ReturnedLocation -= 4*TargetActor.CollisionRadius*Normal( PawnTargetVector cross vect(0,0,1) ); // target right of feet } else { ReturnedLocation += 4*TargetActor.CollisionRadius*Normal( PawnTargetVector cross vect(0,0,1) ); // target left of feet } } } //DMTNS( "MultiShotCount: " $ MultiShotCount ); //AddArrow( Pawn.Location, ReturnedLocation, ColorGreen() ); return ReturnedLocation; } //----------------------------------------------------------------------------- function FireShot( byte bUseAltMode ) { //DMTNS( "FireShot" ); MultiShotCount = 0; // new salvo if( NumSingleShots >= 2 ) bSingleShot = false; else bSingleShot = ( NumMultiShots >= 2 || FDecision( SingleShotOdds ) ); if( bSingleShot ) { U2SH.MeshAgentSetInputCurValue( 'RangedAttack', 'OneShot' ); NumSingleShots++; NumMultiShots = 0; } else { U2SH.MeshAgentSetInputCurValue( 'RangedAttack', 'MultiShot' ); NumMultiShots++; NumSingleShots = 0; } Super.FireShot( bUseAltMode ); } //----------------------------------------------------------------------------- defaultproperties { SingleShotOdds=0.500000 DefensiveSounds(0)="U2WeaponsA.BulletImpacts.BulletMetal01" DefensiveSounds(1)="U2WeaponsA.BulletImpacts.BulletMetal02" DefensiveSounds(2)="U2WeaponsA.BulletImpacts.BulletMetal04" DefensiveSounds(3)="U2WeaponsA.BulletImpacts.RicMetal01" DefensiveSounds(4)="U2WeaponsA.BulletImpacts.RicMetal09" DefensiveRicochetSounds(0)="U2WeaponsA.BulletImpacts.RicMetal01" DefensiveRicochetSounds(1)="U2WeaponsA.BulletImpacts.RicMetal09" DefensiveRicochetSounds(2)="U2WeaponsA.BulletImpacts.RicMetal13" bCanDefend=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 |