UnrealScript Game Programming Cookbook

(Chris Devlin) #1

Weapons


166


  1. Our homing properties section is the bread and butter of our class. This is where
    you'll alter the default values for anything to do with locking onto pawns.
    // Homing properties
    /* angle for locking for lock
    targets when on Console
    /
    ConsoleLockAim=0.992


/** How far out should we be before considering actors for
a lock? */
LockRange=9000

// Angle for locking, for lockTarget
LockAim=0.997

// How often we check for lock
LockChecktime=0.1

// How long does player need to hover over actor to lock?
LockAcquireTime=.3

// How close does the trace need to be to the actual target
LockTolerance=0.8

SeekingRocketClass=class'UTProj_SeekingRocket'


  1. Animations are an essential part of realism, so we want the camera to shake
    when firing a weapon, in addition to an animation for the weapon itself.
    // camera anim to play when firing (for camera shakes)
    FireCameraAnim(1)=CameraAnim'Camera_FX.ShockRifle.
    C_WP_ShockRifle_Alt_Fire_Shake'


// Animation to play when the weapon is fired
WeaponFireAnim(1)=WeaponAltFire


  1. While we're on the topic of visuals, we may as well add the flashes at the muzzle,
    as well as the crosshairs for the weapon.
    // Muzzle flashes
    MuzzleFlashPSCTemplate=WP_ShockRifle.Particles.
    P_ShockRifle_MF_Alt


MuzzleFlashAltPSCTemplate=WP_ShockRifle.Particles.
P_ShockRifle_MF_Alt

MuzzleFlashColor=(R=200,G=120,B=255,A=255)
Free download pdf