| Home Page | Recent Changes | Preferences

How Firing Doesn't Work

This page illustrates a flow of control that is executed when the player hits the fire button. However, in practice this is NOT how weapon firing works! For that, see How UT2003 Weapons Work/Firing A Weapon.

The 'decoy' chain goes like this:

exec function Fire( optional float F )
{
    if ( Level.Pauser == PlayerReplicationInfo )
    {
        SetPause(false);
        return;
    }
    Pawn.Fire(F);
}

Here is easy: if the level is not in pause mode, call the Pawn's Fire function. If the level is paused and the person who paused it is the one who's firing, it unpauses the level but does not fire the weapon.

function Fire( optional float F )
{
    if( Weapon!=None )
        Weapon.Fire(F);
}

Again, piece of cake: if the pawn has a weapon, call the weapon Fire function.

simulated function Fire(float F)
{
}

There's no code here! Normally you would expect to see the Fire method implemented in subclasses of Weapon. But none of the weapon classes actually implement this! At the time of writing, we don't believe this is used anywhere. See How UT2003 Weapons Work/Firing A Weapon for a more likely story.

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

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