Article View: alt.games.unreal.tournament
Article #191413Re: The final skill to master ... any advice?
From: goPostal
Date: Fri, 19 Dec 2008 01:02
Date: Fri, 19 Dec 2008 01:02
114 lines
4833 bytes
4833 bytes
"goPostal" <agutgopostal@hotmail.com> wrote in message
news:2aC2l.8410$%z5.1580@newsfe09.iad...
>
Yay, it worked!
To answer you, I've never stopped learning UT stuff. I've been making mods
and monsters for both UT and 2K4 pretty much non-stop. Got a couple of
websites and a bunch of released things. It's my nirvana. I figured I sucked
as a player so I should try to do other UT things :P
Now your question. It's secondary fire, and I'll show you where:
> .state Firing
> .{
> . function AltFire(float F)
> . {
> . }
> .
This part sets up the alt fire itself:
> . function Tick( float DeltaTime )
> . {
> . local Pawn P;
> . local Rotator EnemyRot;
> . local vector HitLocation, HitNormal, StartTrace, EndTrace, X, Y,
> Z;
> . local actor HitActor;
> .
> . if ( bChangeWeapon )
> . GotoState('DownWeapon');
> .
> . if ( Bot(Owner) != None )
> . {
> . if ( Bot(Owner).Enemy == None )
> . Bot(Owner).bFire = 0;
> . else
> . Bot(Owner).bFire = 1;
> . }
> . P = Pawn(Owner);
> . if ( P == None )
> . {
> . AmbientSound = None;
> . GotoState('');
> . return;
> . }
> . else if( P.bFire==0 )
> . {
> . TraceFire(0);
> . PlayFiring();
> . GoToState('FireBlast');
> . return;
> . }
> .
> . ChargeSize += 0.75 * DeltaTime;
> .
> . Count += DeltaTime;
> . if ( Count > 0.2 )
> . {
> . Count = 0;
> . Owner.MakeNoise(1.0);
> . }
> . if (ChargeSize > 1)
> . {
Here it wants to know if the alt fire hits another player/bot (thats a
playerpawn). If it does it add yaw to them (pushes them back basically):
> . if ( !P.IsA('PlayerPawn') && (P.Enemy != None) )
> . {
> . EnemyRot = Rotator(P.Enemy.Location - P.Location);
> . EnemyRot.Yaw = EnemyRot.Yaw & 65535;
> . if ( (abs(EnemyRot.Yaw - (P.Rotation.Yaw & 65535)) >
> 8000)
> . && (abs(EnemyRot.Yaw - (P.Rotation.Yaw & 65535)) <
> 57535) )
> . return;
> . GetAxes(EnemyRot,X,Y,Z);
> . }
If it doesn't then it hits any other actors (like an incoming rocket :P)
effectively canceling them out:
> . else
> . GetAxes(P.ViewRotation, X, Y, Z);
> . StartTrace = P.Location + CalcDrawOffset() + FireOffset.X * X
> + FireOffset.Y * Y + FireOffset.Z * Z;
> . if ( (Level.NetMode == NM_Standalone) &&
> P.IsA('PlayerPawn') )
> . EndTrace = StartTrace + 25 * X;
> . else
> . EndTrace = StartTrace + 60 * X;
> . HitActor = Trace(HitLocation, HitNormal, EndTrace,
> StartTrace, true);
If there's nothing to hit then it just does the animation:
> . if ( (HitActor != None) && (HitActor.DrawType == DT_Mesh) )
> . {
> . ProcessTraceHit(HitActor, HitLocation, HitNormal,
> vector(AdjustedAim), Y, Z);
> . PlayFiring();
> . GoToState('FireBlast');
> . }
> . }
> . }
>
I hope this helps you out. The "window" for this is incredibly small. The
timing is gonna be tough to get correct.
Technical Details
Message-ID:
<koC2l.58963$yB4.56882@newsfe07.iad>Path:
mbox-mo1.pugleaf.net!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad.newshosting.com!newshosting.com!69.16.185.16.MISMATCH!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!newsfe07.iad.POSTED!7564ea0f!not-for-mailReferences:
<VsadnYncI41oWNXUnZ2dnUVZ_gednZ2d@giganews.com> <T982l.10123$297.4107@newsfe23.iad> <Za82l.10124$297.4683@newsfe23.iad> <F-edneZLT_mYCdfUnZ2dnUVZ_u-dnZ2d@giganews.com> <2aC2l.8410$%z5.1580@newsfe09.iad>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad.newshosting.com!newshosting.com!69.16.185.16.MISMATCH!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!newsfe07.iad.POSTED!7564ea0f!not-for-mail From: "goPostal" <agutgopostal@hotmail.com> Newsgroups: alt.games.unreal.tournament References: <VsadnYncI41oWNXUnZ2dnUVZ_gednZ2d@giganews.com> <T982l.10123$297.4107@newsfe23.iad> <Za82l.10124$297.4683@newsfe23.iad> <F-edneZLT_mYCdfUnZ2dnUVZ_u-dnZ2d@giganews.com> <2aC2l.8410$%z5.1580@newsfe09.iad> Subject: Re: The final skill to master ... any advice? Lines: 116 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-RFC2646: Format=Flowed; Response Message-ID: <koC2l.58963$yB4.56882@newsfe07.iad> NNTP-Posting-Host: ajhcoboonebdnpflemaihmdmaafnapij X-Complaints-To: abuse@charter.net X-Trace: meohkjfdkiefkjamfkhgnhldfhiklkalpjigfgodgomdkglmajhcoboonebdnpflmbmokdamanibbeedncmpcogflafaecmocgpkmbbdmhfalaffddphkmeonfenoahhbgjklipccefckbgb NNTP-Posting-Date: Fri, 19 Dec 2008 01:02:08 UTC Date: Thu, 18 Dec 2008 17:02:06 -0800 Bytes: 4729 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit