| Home Page | Recent Changes | Preferences


UT2003, Build 2225

// AdrenalinePickup  //Name of the class
class AdrenalinePickup extends TournamentPickUp; //Says this class is a subclass of Tournament Pickups

var() float AdrenalineAmount; //The variable that determines adreneline you get from the pickup

DetourWeight() //How much the bots will stray off a course to pick up this object
function float DetourWeight(Pawn Other,float PathWeight)
    if ( !Other.Controller.NeedsAdrenaline() )
        return 0;
    return MaxDesireability;

event float BotDesireability(Pawn Bot) //Determines how much a bot will want to pick this up
    if ( Bot.Controller.bHuntPlayer )
        return 0;
    if ( !Bot.Controller.NeedsAdrenaline() )
        return 0;
    return MaxDesireability;

auto state Pickup //What happens when you pick this up
    function Touch( actor Other )
        local Pawn P;
        if ( ValidTouch(Other) ) //If a player touches an adreneline pill...
            P = Pawn(Other);    
            P.Controller.AwardAdrenaline(AdrenalineAmount); //He will get Adreneline based off of the variable AdrenelineAmount...
            AnnouncePickup(P); //The player will recieve a message that he has recieved adreneline...
            SetRespawn(); //And the Adreneline will be set to respawn in a few seconds      

defaultproperties //Definitions for variables used by this class
     AdrenalineAmount=3.000000 //How much adreneline you get
     MaxDesireability=0.300000 //The amount of desireability the bots have for it
     RespawnTime=30.000000 //How long it takes to respawn (in second)
     PickupMessage="Adrenaline " //The message you get when you pick it up
     PickupSound=Sound'PickupSounds.AdrenelinPickup' //The pick up sound
     Physics=PHYS_Rotating //The physics for the adreneline model.  This sets the model to spin in place.
     AmbientGlow=255 //The glow the pill gives off
     CollisionRadius=32.000000 //The radius...
     CollisionHeight=23.000000 //And height to determine when you collide with the pickup, there adding it to your inventory
     Mass=10.000000 //The pill's mass
     RotationRate=(Yaw=24000) //How fast the pill rotates

Any corrections are helpful and would be appreciated

Related Topics

Code References


The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands


Mapping Topics

Mapping Lessons

UnrealEd Interface


Scripting Topics

Scripting Lessons

Making Mods

Class Tree


Modeling Topics


Log In