Grappling Hook - author: [mr.self-destruct] | |||||
In this we
shall go through how to make a grappling hook that uses real world
physics. This grappling hook is a offshoot of Pfhoenix's early work on the
RealGrapple, so thanks Pfhoenix, Frederico & Gopher42, this grapple
wouldn't exist without you guys ;)
Grappling hook:
var bool bHooked; replication simulated function Destroyed() Super.Destroyed(); simulated function Tick(float DeltaTime) if
(bHooked) function StartGrapple() // Don't start grappling if we're already
grappling GetAxes(Pawn(Owner).ViewRotation, X, Y, Z);
// End trace to stop people grappling stupidly long
distances if (Other == None) Other.TakeDamage(10.0, Pawn(Owner), HitLocation,
400.0 * X, 'grapple');
if (!Other.IsA('Pawn') &&
!Other.IsA('Projectile') &&
!Other.IsA('Decoration')) // Give the player a "kick" to get them
moving function StopGrapple() // Fire to begin grappling // AltFire to stop grappling state NormalFire state AltFiring // Putting down weapon in favor of a new one function
BeginState() defaultproperties
var GChain Chain; simulated function
Destroyed() simulated function CheckBeam(vector X, float
DeltaTime) simulated function UpdateBeam(GChain ParentChain, vector Dir,
float
DeltaTime) defaultproperties var vector HookLocation;
replication simulated function Tick(float DeltaTime) defaultproperties | |||||
suggestions? questions? comments? please send them all to ray@beyondunreal.com |
copyright 2001 ray davis. this site and all
content belongs to me unless otherwise noted, with the exception of some
tutorials. the authors retain the rights to their material, and are
hosted here with their express permission. everything else is mine
though, so don't steal it. bastards. privacy |