Worst-case scenario: the UEd Goblin wipes the map and burns down your house.

UE3:UTWeap_RocketLauncher (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 06:04, 17 January 2010 by Wormbo (Talk | contribs) (1 revision: class descriptions for UDK January update (part 9))

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UDK Object >> Actor >> Inventory >> Weapon >> GameWeapon >> UTWeapon >> UTWeap_RocketLauncher

Contents

Package: 
UTGame
Direct subclass:
UTWeap_RocketLauncher_Content
This class in other games:
UT3


Properties[edit]

Property group 'Locking'[edit]

LockAcquireTime[edit]

Type: float

How long does the player need to target an actor to lock on to it

LockCheckTime[edit]

Type: float

The frequency with which we will check for a lock

LockTolerance[edit]

Type: float

Once locked, how long can the player go without painting the object before they lose the lock

Internal variables[edit]

See UTWeap_RocketLauncher internal variables.

Default values[edit]

Property Value
ItemName "Rocket Launcher"
PickupMessage "Rocket Launcher"
Priority 10.1
WeaponFireWaveForm ForceFeedbackWaveform'UTGame.Default__UTWeap_RocketLauncher:ForceFeedbackWaveformShooting1'

Subobjects[edit]

FirstPersonMesh[edit]

Class: UTGame.UTSkeletalMeshComponent

Inherits from: UTWeapon.FirstPersonMesh

Property Value
ReplacementPrimitive None

PickupMesh[edit]

Class: Engine.SkeletalMeshComponent

Inherits from: UTWeapon.PickupMesh

Property Value
ReplacementPrimitive None

Enums[edit]

ERocketFireMode1[edit]

RFM_Spread 
RFM_Spiral 
RFM_Grenades 
RFM_Max 

Functions[edit]

Native functions[edit]

CanLockOnTo[edit]

native function bool CanLockOnTo (Actor TA)

Given an actor (TA) determine if we can lock on to it. By default only allow locking on to pawns. Some weapons may want to be able to lock on to other actors.

CheckTargetLock[edit]

native function CheckTargetLock ()

The function checks to see if we are locked on a target

UpdateLockTarget[edit]

native function UpdateLockTarget (Actor NewLockTarget)


Events[edit]

AdjustLockTarget[edit]

event AdjustLockTarget (Actor NewLockTarget)

This function is used to adjust the LockTarget.

Called by UpdateLockTarget() only when NewLockTarget is different from LockTarget

CauseMuzzleFlash[edit]

simulated event CauseMuzzleFlash ()

Overrides: UTWeapon.CauseMuzzleFlash

Causes the muzzle flashlight to turn on and setup a time to turn it back off again.

CauseMuzzleFlashLight[edit]

simulated event CauseMuzzleFlashLight ()

Overrides: UTWeapon.CauseMuzzleFlashLight

Causes the muzzle flashlight to turn on

Destroyed[edit]

simulated event Destroyed ()

Overrides: UTWeapon.Destroyed

Event called when weapon actor is destroyed

MuzzleFlashTimer[edit]

simulated event MuzzleFlashTimer ()

Overrides: UTWeapon.MuzzleFlashTimer

Turns the MuzzleFlashlight off

ReplicatedEvent[edit]

simulated event ReplicatedEvent (name VarName)

Overrides: UTWeapon.ReplicatedEvent


StopMuzzleFlash[edit]

simulated event StopMuzzleFlash ()

Overrides: UTWeapon.StopMuzzleFlash

Quickly turns off an active muzzle flash

Other instance functions[edit]

ActiveRenderOverlays[edit]

simulated function ActiveRenderOverlays (HUD H)

Overrides: UTWeapon.ActiveRenderOverlays

Access to HUD and Canvas. Event always called when the InventoryManager considers this Inventory Item currently "Active" (for example active weapon)

Parameters:

  • HUD - HUD with canvas to draw on

AddAmmo[edit]

function int AddAmmo (int Amount)

Overrides: UTWeapon.AddAmmo

This function is used to add ammo back to a weapon. It's called from the Inventory Manager

AdjustWeaponTimingForConsole[edit]

simulated function AdjustWeaponTimingForConsole ()

Overrides: UTWeapon.AdjustWeaponTimingForConsole

Adjust weapon equip and fire timings so they match between PC and console This is important so the sounds match up.

AttachMuzzleFlash[edit]

simulated function AttachMuzzleFlash ()

Overrides: UTWeapon.AttachMuzzleFlash

Called on a client, this function Attaches the WeaponAttachment to the Mesh.

BestMode[edit]

function byte BestMode ()

Overrides: UTWeapon.BestMode

BestMode() choose between regular or alt-fire

DetachMuzzleFlash[edit]

simulated function DetachMuzzleFlash ()

Overrides: UTWeapon.DetachMuzzleFlash

Remove/Detach the muzzle flash components

DrawLFMData[edit]

simulated function DrawLFMData (HUD Hud)

Hud/Crosshairs

FireAmmunition[edit]

simulated function FireAmmunition ()

Overrides: UTWeapon.FireAmmunition

Deactiveate Spawn Protection

FireLoad[edit]

function FireLoad ()

Fire off a load of rockets.

Network: Server Only

GetAIRating[edit]

function float GetAIRating ()

Overrides: Weapon.GetAIRating

AI interface

GetFireInterval[edit]

simulated function float GetFireInterval (byte FireModeNum)

Overrides: UTWeapon.GetFireInterval

Returns interval in seconds between each shot, for the firing state of FireModeNum firing mode. We override it here to support the queue!

Parameters:

  • FireModeNum - fire mode

Returns:

Period in seconds of firing mode

GetProjectileClass[edit]

function class<ProjectileGetProjectileClass ()

Overrides: Weapon.GetProjectileClass

We override GetProjectileClass to swap in a Seeking Rocket if we are locked on.

GetSpreadDist[edit]

simulated function int GetSpreadDist ()

Returns:

The amount of spread

GetWeaponDebug[edit]

simulated function GetWeaponDebug (out array<stringDebugInfo)

Overrides: Weapon.GetWeaponDebug

Retrieves important weapon debug information as an array of strings. That can then be dumped or displayed on HUD.

HideRocket[edit]

simulated function HideRocket (name RocketName, bool ShouldHide)


HideRocketAmmo[edit]

simulated function HideRocketAmmo ()


PlayFiringSound[edit]

simulated function PlayFiringSound ()

Overrides: UTWeapon.PlayFiringSound

Tells the weapon to play a firing sound (uses CurrentFireMode)

ProjectileFire[edit]

simulated function Projectile ProjectileFire ()

Overrides: UTWeapon.ProjectileFire

If we are locked on, we need to set the Seeking projectiles LockedTarget.

SuggestAttackStyle[edit]

function float SuggestAttackStyle ()

Overrides: Weapon.SuggestAttackStyle

AI Interface

UpdateAmmoVisibility[edit]

simulated function UpdateAmmoVisibility ()


WeaponFireLoad[edit]

simulated function WeaponFireLoad ()


States[edit]

Active[edit]

Inherits from: UTWeapon.Active

Modifiers: simulated

Active.BeginState[edit]

simulated event BeginState (name PreviousStateName)

Overrides: UTWeapon.Active.BeginState

Initialize the weapon as being active and ready to go.

Inactive[edit]

state Inactive This state is the default state. It needs to make sure Zooming is reset when entering/leaving

Inherits from: UTWeapon.Inactive

Modifiers: auto, simulated

Inactive.BeginState[edit]

simulated event BeginState (name PreviousStateName)

Overrides: UTWeapon.Inactive.BeginState

Clear out the PendingFires

Inactive.EndState[edit]

simulated event EndState (name NextStateName)

Overrides: UTWeapon.Inactive.EndState

Called immediately before going out of the current state, while within the GotoState() call that caused the state change, and before BeginState() is called within the new state.

WeaponFiring[edit]

Inherits from: UTWeapon.WeaponFiring

Modifiers: simulated

WeaponFiring.ReplicatedEvent[edit]

simulated event ReplicatedEvent (name VarName)

Overrides: UTWeapon.WeaponFiring.ReplicatedEvent


WeaponLoadAmmo[edit]

State WeaponLoadAmmo In this state, ammo will continue to load up until MaxLoadCount has been reached. It's similar to the firing state

Modifiers: simulated

WeaponLoadAmmo.BeginState[edit]

simulated event BeginState (name PreviousStateName)

Overrides: Object.BeginState (global)

Initialize the alt fire state

WeaponLoadAmmo.EndState[edit]

simulated event EndState (name NextStateName)

Overrides: Object.EndState (global)

Insure that the LoadedShotCount is 0 when we leave this state

WeaponLoadAmmo.IsFiring[edit]

simulated event bool IsFiring ()

Overrides: Weapon.IsFiring (global)

Returns true if the weapon is firing, used by AI

WeaponLoadAmmo.AddAmmo[edit]

function int AddAmmo (int Amount)

Overrides: AddAmmo (global)

This function is used to add ammo back to a weapon. It's called from the Inventory Manager

WeaponLoadAmmo.AddProjectile[edit]

simulated function AddProjectile ()

Adds a projectile to the queue and uses up some ammo. In Addition, it plays a sound so that other pawns in the world can hear it.

WeaponLoadAmmo.BeginFire[edit]

simulated function BeginFire (byte FireModeNum)

Overrides: Weapon.BeginFire (global)

We override BeginFire to detect a normal fire press and switch in to flocked mode

WeaponLoadAmmo.CanViewAccelerationWhenFiring[edit]

simulated function bool CanViewAccelerationWhenFiring ()

Overrides: UTWeapon.CanViewAccelerationWhenFiring (global)

You can run around loading up rockets ready to fire them! *

WeaponLoadAmmo.DrawWeaponCrosshair[edit]

simulated function DrawWeaponCrosshair (HUD HUD)

Overrides: UTWeapon.DrawWeaponCrosshair (global)

Draw the Crosshairs

WeaponLoadAmmo.EndFire[edit]

simulated function EndFire (byte FireModeNum)

Overrides: UTWeapon.EndFire (global)

We need to override EndFire so that we can correctly fire off the current load if we have any.

WeaponLoadAmmo.RefireCheckTimer[edit]

simulated function RefireCheckTimer ()

Overrides: UTWeapon.RefireCheckTimer (global)


WeaponLoadAmmo.TimeWeaponFiring[edit]

simulated function TimeWeaponFiring (byte FireModeNum)

Overrides: Weapon.TimeWeaponFiring (global)

(Description copied from Weapon.TimeWeaponFiring)
Sets the timing for the firing state on server and local client. By default, a constant looping Rate Of Fire (ROF) is set up. When the delay has expired, the RefireCheckTimer event is triggered.

Network: LocalPlayer and Server

Parameters:

  • FireModeNum - Fire Mode.

WeaponLoadAmmo.TryPutdown[edit]

simulated function bool TryPutdown ()

Overrides: UTWeapon.TryPutDown (global)

When attempting to put the weapon down, look to see if our MinReloadPct has been met. If so just put it down

WeaponLoadAmmo.WeaponEmpty[edit]

simulated function WeaponEmpty ()

Overrides: UTWeapon.WeaponEmpty (global)

Called when the weapon runs out of ammo during firing

WeaponPlayingFire[edit]

Modifiers: simulated

WeaponPlayingFire.EndState[edit]

simulated event EndState (name NextStateName)

Overrides: Object.EndState (global)

Clean up the weapon. Reset the shot count, etc

WeaponPlayingFire.IsFiring[edit]

simulated event bool IsFiring ()

Overrides: Weapon.IsFiring (global)

Returns true if the weapon is firing, used by AI

WeaponPlayingFire.FireAnimDone[edit]

simulated function FireAnimDone ()

When the Fire animation is done chain the ending animation.

WeaponPlayingFire.FireAnimEnded[edit]

simulated function FireAnimEnded ()

When the End-Fire animation is done return to the active state

WeaponPlayingFire.PlayFiringAnim[edit]

simulated function PlayFiringAnim ()

Choose the proper "Firing" animation to play depending on the number of shots loaded.

WeaponPlayingFire.PlayFiringEndAnim[edit]

simulated function PlayFiringEndAnim ()

Choose the proper "We are done firing, reset" animation to play depending on the number of shots loaded

WeaponWaitingForFire[edit]

Modifiers: simulated

WeaponWaitingForFire.BeginState[edit]

simulated event BeginState (name PrevStateName)

Overrides: Object.BeginState (global)

Set the Grace Period

WeaponWaitingForFire.EndState[edit]

simulated event EndState (name NextStateName)

Overrides: Object.EndState (global)

Insure that the LoadedShotCount is 0 when we leave this state

WeaponWaitingForFire.IsFiring[edit]

simulated event bool IsFiring ()

Overrides: Weapon.IsFiring (global)

Returns true if the weapon is firing, used by AI

WeaponWaitingForFire.BeginFire[edit]

simulated function BeginFire (byte FireModeNum)

Overrides: Weapon.BeginFire (global)

We override BeginFire to detect a normal fire press and switch in to flocked mode

WeaponWaitingForFire.DrawWeaponCrosshair[edit]

simulated function DrawWeaponCrosshair (HUD HUD)

Overrides: UTWeapon.DrawWeaponCrosshair (global)

Draw the Crosshairs

WeaponWaitingForFire.EndFire[edit]

simulated function EndFire (byte FireModeNum)

Overrides: UTWeapon.EndFire (global)

If we get an EndFire - Exit Immediately

WeaponWaitingForFire.ForceFireTimer[edit]

simulated function ForceFireTimer ()

Fire the load

WeaponWaitingForFire.TryPutdown[edit]

simulated function bool TryPutdown ()

Overrides: UTWeapon.TryPutDown (global)

When attempting to put the weapon down, look to see if our MinReloadPct has been met. If so just put it down

WeaponWaitingForFire.WeaponEmpty[edit]

simulated function WeaponEmpty ()

Overrides: UTWeapon.WeaponEmpty (global)

Called when the weapon runs out of ammo during firing