| Home Page | Recent Changes

HealthPack

UT2003 :: Actor >> Pickup >> TournamentPickup >> TournamentHealth >> HealthPack (Package: XPickups)

This is the standard HealthPack Pickup giving 50 points of health to a player by default.

How it works

This code is from UT2003 Build 2225

//=============================================================================
// HealthPack
//=============================================================================
class HealthPack extends TournamentHealth;  // our class and its parent

#exec OBJ LOAD FILE=PickupSounds.uax // the PickupSounds.uax package contains... wait for it... sounds.
#exec OBJ LOAD FILE=E_Pickups.usx    // loading these two files is the only way we can access their contents here in our code.

defaultproperties
{
    Physics=PHYS_Rotating                       // sets our big blue health cross rotating on the xPickupBase.
    RotationRate=(Yaw=24000)                    // sets the speed that it rotates at
    DrawScale=0.4                               // the model is much larger than it appears as in the game. This scales it down.
    PickupSound=sound'PickupSounds.HealthPack'  // the sound you hear when you pick it up.
    PickupForce="HealthPack"  // jdf
    DrawType=DT_StaticMesh                      // if you want to use a static mesh for the object, you have to tell the engine.
    StaticMesh=StaticMesh'E_Pickups.MidHealth'  // this is the particular static mesh we want to use.   
    CollisionRadius=32.0                        // determines how close to the object you must be to pick it up.
    HealingAmount=25                            // how much healing it does
    Style=STY_AlphaZ
    ScaleGlow=0.6
}

The Health pickup line of classes aren't very big or complicated, they get most of their functionality from the TournamentPickup and Pickup classes.

Related Topics


Category Class (UT2003)

Category Class (UT2004)

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

FAQs

Help Desk

Mapping Topics

Mapping Lessons

UnrealEd Interface

UnrealScript Topics

UnrealScript Lessons

Making Mods

Class Tree

Modeling Topics

Chongqing Page

Log In