Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel

UE3:UTWeap_Avril (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT3 Object >> Actor >> Inventory >> Weapon >> GameWeapon >> UTWeapon >> UTWeap_Avril

Contents

Package: 
UTGame
Direct subclass:
UTWeap_Avril_Content

Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.

Properties

Property group 'Locking'

LockAcquireTime

Type: float

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

Default value: 0.05

LockCheckTime

Type: float

The frequency with which we will check for a lock

Default value: 0.05

LockRange

Type: int

How far out should we be considering actors for a lock

Default value: 22000

LockTolerance

Type: float

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

Default value: 0.4

Internal variables

bLockedOnTarget

Type: bool

When true, this weapon is locked on target

bTargetingLaserActive

Type: bool

set when holding altfire for targeting laser (can't use normal state system because it can fire simultaneously with primary)

bTargetLockingActive

Type: bool

If true, weapon will try to lock onto targets

ConsoleLockAim

Type: float

angle for locking for lock targets when on Console

Default value: 0.992

DeferredReloadTime

Type: float

If you shortcircut the reload, the time will get deferred until you bring the weapon back up

FireTime

Type: float

How long the fire sequence takes

Default value: 1.0

LaserEffect

Type: ParticleSystemComponent

component for the laser effect

LastLockedOnTime

Type: float

How long since the Lock Target has been valid

LastTargetedProjectilesCheckTime

Type: float

last time TargetedProjectiles list was updated

LastTargetLockCheckTime

Type: float

Last time target lock was checked

LastValidTargetTime

Type: float

When was the last time we had a valid target

LockAcquiredSound

Type: SoundCue

Sound Effects to play when Locking

LockAim

Type: float

angle for locking for lock targets

Default value: 0.996

LockedTarget

Type: Actor

Modifiers: repnotify

What "target" is this weapon locked on to

LockLostSound

Type: SoundCue


MaxControlledProjectiles

Type: int

the maximum number of projectiles we're allowed to control simultaneously

Default value: 8

MyRocket

Type: UTProj_AvrilRocketBase

Modifiers: repnotify

A pointer to the currently controlled rocket

NoAmmoWeaponPutDownAnim

Type: name

Animation to play when there is no ammo

PendingLockedTarget

Type: Actor

What "target" is current pending to be locked on to

PendingLockedTargetTime

Type: float

When did the pending Target become valid

ReloadAnimSpeed

Type: float

The speed of a deferred reload

ReloadCue

Type: SoundCue


ReloadSound

Type: AudioComponent


ReloadTime

Type: float

How long the reload sequence takes

Default value: 3.0

TargetedProjectiles

Type: array<UTProjectile>

list of known mines/rockets to affect

TargetingLaserAmbientSound

Type: SoundCue

laser sounds

TargetingLaserStartSound

Type: SoundCue

laser sounds

TargetingLaserStopSound

Type: SoundCue

laser sounds

WeaponReloadAnim

Type: name

Anim to play while reloading

Default values

Property Value
AIRating 0.55
AmmoCount 5
bLeadTarget False
bSplashJump True
bTargetAdhesionEnabled True
bTargetFrictionEnabled True
bWarnIfInLocker True
bZoomedFireMode[1] 1
CrossHairCoordinates
Member Value
U 384.0
CurrentRating 0.55
EquipTime 0.75
FireInterval[0] 4.0
FireInterval[1] 0.0
FireOffset
Member Value
X 16.0
Y 8.0
Z -5.0
GroupWeight 0.6
IconCoordinates
Member Value
U 728.0
UL 145.0
V 427.0
VL 52.0
IconHeight 47
IconWidth 29
IconX 460
IconY 343
InventoryGroup 10
ItemName "Longbow AVRiL"
LockerAmmoCount 5
LockerRotation
Member Value
Pitch 0
Roll -16384
Yaw 0
MaxAmmoCount 15
MaxDesireability 0.7
MaxPitchLag 300.0
MaxYawLag 400.0
MinReloadPct[0] 0.15
MinReloadPct[1] 0.15
MuzzleFlashLightClass Class'UTGame.UTRocketMuzzleFlashLight'
PickupMessage "Longbow AVRiL"
Priority 1.5
PutDownTime 0.45
QuickPickGroup 1
QuickPickWeight 0.9
ShotCost[1] 0
ShouldFireOnRelease[0] 1
TickGroup TG_PostAsyncWork
WeaponColor
Member Value
A 255
B 0
G 0
R 255
WeaponFireTypes[0] EWFT_Projectile
WeaponFireTypes[1] EWFT_None
ZoomedRate 200.0
ZoomedTargetFOV 40.0

Subobjects

FirstPersonMesh

Class: UTGame.UTSkeletalMeshComponent

Inherits from: UTWeapon.FirstPersonMesh

No new values.

PickupMesh

Class: Engine.SkeletalMeshComponent

Inherits from: UTWeapon.PickupMesh

No new values.

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

Destroyed

simulated event Destroyed ()

Overrides: UTWeapon.Destroyed

Event called when weapon actor is destroyed

ReplicatedEvent

simulated event ReplicatedEvent (name VarName)

Overrides: UTWeapon.ReplicatedEvent


SetPosition

simulated event SetPosition (UTPawn Holder)

Overrides: UTWeapon.SetPosition

This function aligns the gun model in the world

Tick

simulated event Tick (float DeltaTime)

Overrides: Actor.Tick


Other instance functions

ActiveRenderOverlays

simulated function ActiveRenderOverlays (HUD H)

Overrides: UTWeapon.ActiveRenderOverlays

Draw the Avril hud

AttachWeaponTo

simulated function AttachWeaponTo (SkeletalMeshComponent MeshCpnt, optional name SocketName)

Overrides: UTWeapon.AttachWeaponTo

(Description copied from UTWeapon.AttachWeaponTo)
Attach Weapon Mesh, Weapon MuzzleFlash and Muzzle Flash Dynamic Light to a SkeletalMesh

Parameters:

  • who - is the pawn to attach to

BeginFire

simulated function BeginFire (byte FireModeNum)

Overrides: Weapon.BeginFire

BeginFire is the point at which the server and client sync up their code path. It's job is to set the weapon in to the firing state. Network: LocalPlayer and Server

BestMode

function byte BestMode ()

Overrides: UTWeapon.BestMode

BestMode() choose between regular or alt-fire

CanThrow

simulated function bool CanThrow ()

Overrides: UTWeapon.CanThrow

Returns true if this item can be thrown out.

CheckLockZoom

simulated function CheckLockZoom ()

called when locked target changes, check if we should start or stop the zooming due to the target change

CheckZoom

simulated function bool CheckZoom (byte FireModeNum)

Overrides: UTWeapon.CheckZoom

(Description copied from UTWeapon.CheckZoom)
We Override beginfire to add support for zooming. Should only be called from BeginFire()

Parameters:

  • FireModeNum - The current Firing Mode

Returns:

true we should abort the BeginFire call

EndFire

simulated function EndFire (byte FireModeNum)

Overrides: UTWeapon.EndFire

We Override endfire to add support for zooming

FastReload

simulated function FastReload ()


FindTargetedProjectiles

function FindTargetedProjectiles (Object.Vector TargetLocation, out array<UTSpiderMineTrapTraps)

called on a timer to fill the list of projectiles affected by the targeting laser

GetAIRating

function float GetAIRating ()

Overrides: Weapon.GetAIRating

AI interface

GetEquipTime

simulated function float GetEquipTime ()

Overrides: UTWeapon.GetEquipTime


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.

PassThroughDamage

simulated function bool PassThroughDamage (Actor HitActor)

Overrides: Weapon.PassThroughDamage

returns true if should pass trace through this hitactor

PlayFireEffects

simulated function PlayFireEffects (byte FireModeNum, optional Object.Vector HitLocation)

Overrides: UTWeapon.PlayFireEffects

PlayFireEffects Is the root function that handles all of the effects associated with a weapon. This function creates the 1st person effects. It should only be called on a locally controlled player.

PlayReloadAnim

simulated function PlayReloadAnim (optional float ReloadOverrideTime)


PlayWeaponEquip

simulated function PlayWeaponEquip ()

Overrides: UTWeapon.PlayWeaponEquip

Show the weapon begin equipped

PlayWeaponPutDown

simulated function PlayWeaponPutDown ()

Overrides: UTWeapon.PlayWeaponPutDown

Show the weapon being put away

ProjectileFire

simulated function Projectile ProjectileFire ()

Overrides: UTWeapon.ProjectileFire

Fires a projectile. Spawns the projectile, but also increment the flash count for remote client effects. Network: Local Player and Server

PutDownWeapon

simulated function PutDownWeapon ()

Overrides: Weapon.PutDownWeapon

This function is called to put a weapon down

RecommendRangedAttack

function bool RecommendRangedAttack ()

Overrides: Weapon.RecommendRangedAttack


RelativeStrengthVersus

function float RelativeStrengthVersus (Pawn P, float Dist)

Overrides: Weapon.RelativeStrengthVersus


RocketDestroyed

function RocketDestroyed (UTProj_AvrilRocketBase Rocket)


SetRocketTarget

function SetRocketTarget ()


SuggestAttackStyle

function float SuggestAttackStyle ()

Overrides: Weapon.SuggestAttackStyle


SuggestDefenseStyle

function float SuggestDefenseStyle ()

Overrides: Weapon.SuggestDefenseStyle


TryPutDown

simulated function bool TryPutDown ()

Overrides: UTWeapon.TryPutDown

We override TryPutDown so that we can store the deferred amount of time.

UpdateTargetingLaser

simulated function UpdateTargetingLaser ()

updates the location for the targeting laser and notifies any spider mines or AVRiL rockets in the vacinity

WeaponCalcCamera

simulated function WeaponCalcCamera (float fDeltaTime, out Object.Vector out_CamLoc, out Object.Rotator out_CamRot)

Overrides: Weapon.WeaponCalcCamera

WeaponCalcCamera allows a weapon to adjust the pawn's controller's camera. Should be subclassed

WeaponEmpty

simulated function WeaponEmpty ()

Overrides: UTWeapon.WeaponEmpty

Called when the weapon runs out of ammo during firing

States

Active

Active.ShouldLagRot

simulated function bool ShouldLagRot ()

Overrides: UTWeapon.Active.ShouldLagRot

(Description copied from UTWeapon.ShouldLagRot)


Returns:

whether the weapon's rotation is allowed to lag behind the holder's rotation

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.

WeaponEquipping

State WeaponEquipping The Weapon is in this state while transitioning from Inactive to Active state. Typically, the weapon will remain in this state while its selection animation is being played. While in this state, the weapon cannot be fired.

Inherits from: UTWeapon.WeaponEquipping

Modifiers: simulated

WeaponEquipping.TryPutDown

simulated function bool TryPutDown ()

Overrides: UTWeapon.WeaponEquipping.TryPutDown

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

WeaponFiring

Inherits from: UTWeapon.WeaponFiring

Modifiers: simulated

WeaponFiring.EndState

simulated event EndState (name NextStateName)

Overrides: UTWeapon.WeaponFiring.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.CanThrow

simulated function bool CanThrow ()

Overrides: CanThrow (global)

Returns true if this item can be thrown out.

WeaponFiring.RefireCheckTimer

simulated function RefireCheckTimer ()

Overrides: Weapon.WeaponFiring.RefireCheckTimer

Make sure that aborted weapon switch didn't set deferred reload