The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall


From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 14:06, 5 October 2003 by Dragonmaw (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

UT2003, Build 2225

The Pickup class for any weapon defines how the weapon looks when it's sitting on the ground (or in a xWeaponBase in the case of UT2003).

// Minigun.
class MinigunPickup extends UTWeaponPickup; //The pickup class and its parent
static function StaticPrecache(LevelInfo L) //This are the stuff used by the gun.  Used only after first time game is run
    L.AddPrecacheMaterial(Texture'XEffects.TracerT');                    //The tracers you see when firing
    L.AddPrecacheMaterial(Texture'XEffects.ShellCasingTex');             //The casing texture
    L.AddPrecacheMaterial(Texture'XGameShaders.MinigunFlash');           //The flash of the muzzle
    L.AddPrecacheStaticMesh(StaticMesh'WeaponStaticMesh.MinigunPickup'); //The actual pick-up model
simulated function UpdatePrecacheMaterials() //This adds the stuff used by the minigun to the precache.  Only used first time you play unreal or if a server has changed these materials
defaultproperties //The default settings for a few variables
     MaxDesireability=0.730000                     //How much the bots love this weapon.
     InventoryType=Class'XWeapons.Minigun'         //The type of slot it takes.
     PickupMessage="You got the Minigun."          //The message when you get it.
     PickupSound=Sound'PickupSounds.MinigunPickup' //The sound you hear when you pick it up.

Well, that's it for the minigun. As always corrections are always wanted.


Dragonmaw: I have added a site for cataloguing all break-downs of the code. Here is the link: Code References