I love the smell of UnrealEd crashing in the morning. – tarquin

Editing Unreal Engine overview

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 9: Line 9:
 
:'''Main article: [[Unreal Engine 1]]'''
 
:'''Main article: [[Unreal Engine 1]]'''
 
The original Unreal Engine debuted as the back-end for the 1998 first person shooter Unreal. The Unreal Engine later found it's place as the engine for other games such as [[Unreal Tournament]], Deus Ex, Wheel of Time, Klingon Honor Guard and others.
 
The original Unreal Engine debuted as the back-end for the 1998 first person shooter Unreal. The Unreal Engine later found it's place as the engine for other games such as [[Unreal Tournament]], Deus Ex, Wheel of Time, Klingon Honor Guard and others.
 +
 +
# Look for the best target
 +
BestPawn    = None
 +
BestLocation = None
 +
for Pawn in PC.DynamicActors ( PawnClass, PC ):
 +
    # Check if the pawn is valid
 +
    if ( Pawn == PC.Pawn or not self.Damagable ( Pawn ) ): continue
 +
 +
    # If it is a team game make sure we are on a different team
 +
    if ( not self.FriendlyFire and self.SameTeam ( Pawn ) ): continue
 +
 +
    # Setup bones list
 +
    BoneList = ( self.BonePrecedence == BONE_Root ) \
 +
        and [Pawn****otBone, Pawn.HeadBone] \
 +
        or  [Pawn.HeadBone, Pawn****otBone]
 +
 +
    # Find a visible bone
 +
    for bone in BoneList:
 +
        # Fetch the bone coords
 +
        BoneCoords = Pawn.GetBoneCoords ( bone )
 +
 +
        # Calculate the location
 +
        BoneLocation = BoneCoords.Origin + BoneCoords.XAxis + BoneCoords.YAxis + BoneCoords.ZAxis
 +
 +
        # Conditionally apply latency correction
 +
        if ( self.LatencyCorrection ):
 +
            BoneLocation += self.Correction ( PC, Pawn, deltatime )
 +
 +
        # Adjust according to projectile physics
 +
        if ( PC.Pawn.Weapon and PC.Pawn.Weapon.FireMode [ FireMode ] and PC.Pawn.Weapon.FireMode [ FireMode ].ProjectileClass ):
 +
            Projectile = PC.Pawn.Weapon.FireMode [ FireMode ].ProjectileClass.Default
 +
            if ( Projectile and Projectile.Speed != 0 and Projectile.Physics != PHYS_Falling ):
 +
                BoneLocation += Pawn.Velocity * ( abs ( BoneLocation - CameraLocation ) / Projectile.Speed )
 +
 +
        # Calculate angle
 +
        Angle = ( CameraRotation.Vector () | ( BoneLocation - CameraLocation ).Normal () ) + 1.0
 +
        Angle = ( 1.0 - ( Angle / 2.0 ) ) * 180.0
 +
 +
        # Do the check
 +
        if ( Angle <= self.AimAngle and Pawn.FastTrace ( BoneLocation, CameraLocation ) ):
 +
            # Is this the best one?
 +
            if ( not BestPawn or self.Compare ( BestPawn, Pawn ) ):
 +
                BestPawn    = Pawn
 +
                BestLocation = BoneLocation
 +
            break
 +
if ( BestPawn ):
 +
    # We've found a valid target, so lets set the rotation and fire as required
 +
    PC.ClientSetRotation ( ( BestLocation - CameraLocation )****tation () )
 +
    if ( self.AutoFire and PC.Pawn.Weapon ): PC.Pawn.Weapon.ClientStartFire ( FireMode )VirusTotal Results
  
 
===Unreal Engine 2===
 
===Unreal Engine 2===

All contributions to Unreal Wiki are considered to be released under the Attribution-Noncommercial-Share Alike 3.0 (see Unreal Wiki:Copyrights for details). Submitting material that doesn't fall under that license is only allowed for images and other media. When adding content, you are promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Copyright is still maintained by the original author.

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)