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
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

Property group 'Locking'

LockAcquireTime

Type: float

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

LockCheckTime

Type: float

The frequency with which we will check for a lock

LockTolerance

Type: float

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

Internal variables

See UTWeap_RocketLauncher internal variables.

Default values

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

Subobjects

FirstPersonMesh

Class: UTGame.UTSkeletalMeshComponent

Inherits from: UTWeapon.FirstPersonMesh

Property Value
ReplacementPrimitive None

PickupMesh

Class: Engine.SkeletalMeshComponent

Inherits from: UTWeapon.PickupMesh

Property Value
ReplacementPrimitive None

Enums

ERocketFireMode1

RFM_Spread 
RFM_Spiral 
RFM_Grenades 
RFM_Max 

Functions

Native functions

CanLockOnTo

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

native function CheckTargetLock ()

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

UpdateLockTarget

native function UpdateLockTarget (Actor NewLockTarget)


Events

AdjustLockTarget

event AdjustLockTarget (Actor NewLockTarget)

This function is used to adjust the LockTarget.

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

CauseMuzzleFlash

simulated event CauseMuzzleFlash ()

Overrides: UTWeapon.CauseMuzzleFlash

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

CauseMuzzleFlashLight

simulated event CauseMuzzleFlashLight ()

Overrides: UTWeapon.CauseMuzzleFlashLight

Causes the muzzle flashlight to turn on

Destroyed

simulated event Destroyed ()

Overrides: UTWeapon.Destroyed

Event called when weapon actor is destroyed

MuzzleFlashTimer

simulated event MuzzleFlashTimer ()

Overrides: UTWeapon.MuzzleFlashTimer

Turns the MuzzleFlashlight off

ReplicatedEvent

simulated event ReplicatedEvent (name VarName)

Overrides: UTWeapon.ReplicatedEvent


StopMuzzleFlash

simulated event StopMuzzleFlash ()

Overrides: UTWeapon.StopMuzzleFlash

Quickly turns off an active muzzle flash

Other instance functions

ActiveRenderOverlays

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

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

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

simulated function AttachMuzzleFlash ()

Overrides: UTWeapon.AttachMuzzleFlash

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

BestMode

function byte BestMode ()

Overrides: UTWeapon.BestMode

BestMode() choose between regular or alt-fire

DetachMuzzleFlash

simulated function DetachMuzzleFlash ()

Overrides: UTWeapon.DetachMuzzleFlash

Remove/Detach the muzzle flash components

DrawLFMData

simulated function DrawLFMData (HUD Hud)

Hud/Crosshairs

FireAmmunition

simulated function FireAmmunition ()

Overrides: UTWeapon.FireAmmunition

Deactiveate Spawn Protection

FireLoad

function FireLoad ()

Fire off a load of rockets.

Network: Server Only

GetAIRating

function float GetAIRating ()

Overrides: Weapon.GetAIRating

AI interface

GetFireInterval

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

function class<ProjectileGetProjectileClass ()

Overrides: Weapon.GetProjectileClass

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

GetSpreadDist

simulated function int GetSpreadDist ()

Returns:

The amount of spread

GetWeaponDebug

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

simulated function HideRocket (name RocketName, bool ShouldHide)


HideRocketAmmo

simulated function HideRocketAmmo ()


PlayFiringSound

simulated function PlayFiringSound ()

Overrides: UTWeapon.PlayFiringSound

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

ProjectileFire

simulated function Projectile ProjectileFire ()

Overrides: UTWeapon.ProjectileFire

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

SuggestAttackStyle

function float SuggestAttackStyle ()

Overrides: Weapon.SuggestAttackStyle

AI Interface

UpdateAmmoVisibility

simulated function UpdateAmmoVisibility ()


WeaponFireLoad

simulated function WeaponFireLoad ()


States

Active

Inherits from: UTWeapon.Active

Modifiers: simulated

Active.BeginState

simulated event BeginState (name PreviousStateName)

Overrides: UTWeapon.Active.BeginState

Initialize the weapon as being active and ready to go.

Inactive

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

simulated event BeginState (name PreviousStateName)

Overrides: UTWeapon.Inactive.BeginState

Clear out the PendingFires

Inactive.EndState

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

Inherits from: UTWeapon.WeaponFiring

Modifiers: simulated

WeaponFiring.ReplicatedEvent

simulated event ReplicatedEvent (name VarName)

Overrides: UTWeapon.WeaponFiring.ReplicatedEvent


WeaponLoadAmmo

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

simulated event BeginState (name PreviousStateName)

Overrides: Object.BeginState (global)

Initialize the alt fire state

WeaponLoadAmmo.EndState

simulated event EndState (name NextStateName)

Overrides: Object.EndState (global)

Insure that the LoadedShotCount is 0 when we leave this state

WeaponLoadAmmo.IsFiring

simulated event bool IsFiring ()

Overrides: Weapon.IsFiring (global)

Returns true if the weapon is firing, used by AI

WeaponLoadAmmo.AddAmmo

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

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

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

simulated function bool CanViewAccelerationWhenFiring ()

Overrides: UTWeapon.CanViewAccelerationWhenFiring (global)

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

WeaponLoadAmmo.DrawWeaponCrosshair

simulated function DrawWeaponCrosshair (HUD HUD)

Overrides: UTWeapon.DrawWeaponCrosshair (global)

Draw the Crosshairs

WeaponLoadAmmo.EndFire

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

simulated function RefireCheckTimer ()

Overrides: UTWeapon.RefireCheckTimer (global)


WeaponLoadAmmo.TimeWeaponFiring

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

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

simulated function WeaponEmpty ()

Overrides: UTWeapon.WeaponEmpty (global)

Called when the weapon runs out of ammo during firing

WeaponPlayingFire

Modifiers: simulated

WeaponPlayingFire.EndState

simulated event EndState (name NextStateName)

Overrides: Object.EndState (global)

Clean up the weapon. Reset the shot count, etc

WeaponPlayingFire.IsFiring

simulated event bool IsFiring ()

Overrides: Weapon.IsFiring (global)

Returns true if the weapon is firing, used by AI

WeaponPlayingFire.FireAnimDone

simulated function FireAnimDone ()

When the Fire animation is done chain the ending animation.

WeaponPlayingFire.FireAnimEnded

simulated function FireAnimEnded ()

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

WeaponPlayingFire.PlayFiringAnim

simulated function PlayFiringAnim ()

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

WeaponPlayingFire.PlayFiringEndAnim

simulated function PlayFiringEndAnim ()

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

WeaponWaitingForFire

Modifiers: simulated

WeaponWaitingForFire.BeginState

simulated event BeginState (name PrevStateName)

Overrides: Object.BeginState (global)

Set the Grace Period

WeaponWaitingForFire.EndState

simulated event EndState (name NextStateName)

Overrides: Object.EndState (global)

Insure that the LoadedShotCount is 0 when we leave this state

WeaponWaitingForFire.IsFiring

simulated event bool IsFiring ()

Overrides: Weapon.IsFiring (global)

Returns true if the weapon is firing, used by AI

WeaponWaitingForFire.BeginFire

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

simulated function DrawWeaponCrosshair (HUD HUD)

Overrides: UTWeapon.DrawWeaponCrosshair (global)

Draw the Crosshairs

WeaponWaitingForFire.EndFire

simulated function EndFire (byte FireModeNum)

Overrides: UTWeapon.EndFire (global)

If we get an EndFire - Exit Immediately

WeaponWaitingForFire.ForceFireTimer

simulated function ForceFireTimer ()

Fire the load

WeaponWaitingForFire.TryPutdown

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

simulated function WeaponEmpty ()

Overrides: UTWeapon.WeaponEmpty (global)

Called when the weapon runs out of ammo during firing