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

UE3:UTVehicleWeapon (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> Actor >> Inventory >> Weapon >> GameWeapon >> UTWeapon >> UTVehicleWeapon
Package: 
UTGame
Direct subclasses:
UTVWeap_CicadaMissileLauncher, UTVWeap_CicadaTurret, UTVWeap_MantaGun, UTVWeap_ScorpionTurret, UTVWeap_TowCable
This class in other games:
UT3


Properties

AimingTraceIgnoredActors

Type: array<Actor>

actors that the aiming trace should ignore

AimTraceRange

Type: float

cached max range of the weapon used for aiming traces

AltFireTriggerTags

Type: array<name>

Triggers that should be activated when a weapon fires

AltImpactEffects

Type: array<UTPawn.MaterialImpactEffect>

impact effects by material type

bCurrentlyZoomed

Type: bool

used for client to tell server when zooming, as that is clientside but on console it affects the controls so the server needs to know

bDebugTurret

Type: bool

for debugging turret aiming

bIgnoreDownwardPitch

Type: bool

Same as above, but only allows for downward direction, for vehicles with 'bomber' like behavior.

bIgnoreSocketPitchRotation

Type: bool

If the weapon is attached to a socket that doesn't pitch with player view, and should fire at the aimed pitch, then this should be enabled.

bPlaySoundFromSocket

Type: bool


BulletWhip

Type: SoundCue

sound that is played when the bullets go whizzing past your head

CurrentCrosshairScaling

Type: float


DefaultAltImpactEffect

Type: UTPawn.MaterialImpactEffect

default impact effect to use if a material specific one isn't found

Default value:

Member Value
DecalDissolveParamName 'DissolveAmount'
DurationOfDecal 4.0

DefaultImpactEffect

Type: UTPawn.MaterialImpactEffect

default impact effect to use if a material specific one isn't found

Default value:

Member Value
DecalDissolveParamName 'DissolveAmount'
DurationOfDecal 4.0

FireTriggerTags

Type: array<name>

Triggers that should be activated when a weapon fires

ImpactEffects

Type: array<UTPawn.MaterialImpactEffect>

impact effects by material type

LastCorrectAimTime

Type: float

last time aim was correct, used for looking up GoodAimColor

LastInCorrectAimTime

Type: float

last time aim was incorrect, used for looking up GoodAimColor

MaxFinalAimAdjustment

Type: float

This value is used to cap the maximum amount of "automatic" adjustment that will be made to a shot so that it will travel at the crosshair. If the angle between the barrel aim and the player aim is less than this angle, it will be adjusted to fire at the crosshair. The value is in radians

Default value: 0.995

MyVehicle

Type: UTVehicle

Modifiers: repnotify

Holds a link to the parent vehicle

SeatIndex

Type: int

Holds a link in to the Seats array in MyVehicle that represents this weapon

VehicleClass

Type: class<UTVehicle>

Vehicle class used for drawing kill icons

Default values

Property Value
AimError 600.0
bExportMenuData False
CrossHairCoordinates
Member Value
U 320.0
UL 60.0
V 320.0
VL 56.0
GroupWeight 0.5
InventoryGroup 100
ShotCost[0] 0
ShotCost[1] 0
TickGroup TG_PostAsyncWork
WeaponFireWaveForm ForceFeedbackWaveform'UTGame.Default__UTVehicleWeapon: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

Functions

Static functions

DrawKillIcon

simulated static function DrawKillIcon (Canvas Canvas, float ScreenX, float ScreenY, float HUDScaleX, float HUDScaleY)

Overrides: UTWeapon.DrawKillIcon


GetFireTriggerTag

simulated static function name GetFireTriggerTag (int BarrelIndex, int FireMode)


GetImpactEffect

simulated static function UTPawn.MaterialImpactEffect GetImpactEffect (Actor HitActor, PhysicalMaterial HitMaterial, byte FireModeNum)

returns the impact effect that should be used for hits on the given actor and physical material

Events

GetDesiredAimPoint

simulated event Object.Vector GetDesiredAimPoint (optional out Actor TargetActor)

GetDesiredAimPoint - Returns the desired aim given the current controller

Parameters:

  • TargetActor - out) - if specified, set to the actor being aimed at

Returns:

The location the controller is aiming at

GetPhysicalFireStartLoc

simulated event Object.Vector GetPhysicalFireStartLoc (optional Object.Vector AimDir)

Overrides: UTWeapon.GetPhysicalFireStartLoc

This function returns the world location for spawning the projectile, pulled in to the Pawn's collision along the AimDir direction.

IsAimCorrect

simulated event bool IsAimCorrect ()

IsAimCorrect - Returns true if the turret associated with a given seat is aiming correctly

Returns:

TRUE if we can hit where the controller is aiming

PostBeginPlay

simulated event PostBeginPlay ()

Overrides: UTWeapon.PostBeginPlay

Initialize the weapon

Other instance functions

Activate

simulated function Activate ()

Overrides: UTWeapon.Activate

All inventory use the Activate() function when an item is selected for use. For weapons, this function starts the Equipping process. If the weapon is the inactive state, it will go to the 'WeaponEquipping' followed by 'Active' state, and ready to be fired.

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

CanHitDesiredTarget

simulated function bool CanHitDesiredTarget (Object.Vector SocketLocation, Object.Rotator SocketRotation, Object.Vector DesiredAimPoint, Actor TargetActor, out Object.Vector RealAimPoint)

checks if the weapon is actually capable of hitting the desired target, including trace test (used by crosshair) if false because trace failed, RealAimPoint is set to what the trace hit

DetachWeapon

simulated function DetachWeapon ()

Overrides: UTWeapon.DetachWeapon

(Description copied from UTWeapon.DetachWeapon)
Detach weapon from skeletal mesh

Parameters:

  • SkeletalMeshComponent - weapon is attached to.

DrawTowingIndicator

simulated function DrawTowingIndicator (HUD HUD, float CenterSize)


DrawWeaponCrosshair

simulated function DrawWeaponCrosshair (HUD HUD)

Overrides: UTWeapon.DrawWeaponCrosshair

Draw the Crosshairs

EndFire

simulated function EndFire (byte FireModeNum)

Overrides: UTWeapon.EndFire

We Override endfire to add support for zooming

EndZoom

simulated function EndZoom (UTPlayerController PC)

Overrides: UTWeapon.EndZoom

(Description copied from UTWeapon.EndZoom)
Called when zooming ends

Parameters:

  • PC - cast of Instigator.Controller for convenience

GetAdjustedAim

simulated function Object.Rotator GetAdjustedAim (Object.Vector StartFireLoc)

Overrides: Weapon.GetAdjustedAim

GetAdjustedAim begins a chain of function class that allows the weapon, the pawn and the controller to make on the fly adjustments to where this weapon is pointing.

GetCrosshairScaling

simulated function GetCrosshairScaling (HUD HUD)


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.

Parameters:

  • FireModeNum - fire mode

Returns:

Period in seconds of firing mode

GetFireStartLocationAndRotation

simulated function GetFireStartLocationAndRotation (out Object.Vector StartLocation, out Object.Rotator StartRotation)

returns the location and rotation that the weapon's fire starts at

GetMaxFinalAimAdjustment

simulated function float GetMaxFinalAimAdjustment ()


GetTraceOwner

simulated function Actor GetTraceOwner ()

Overrides: Weapon.GetTraceOwner

(Description copied from Weapon.GetTraceOwner)


Returns:

the actor that 'owns' this weapon's traces (i.e. can't be hit by them)

GetZoomedState

simulated function UTWeapon.EZoomState GetZoomedState ()

Overrides: UTWeapon.GetZoomedState

Returns true if we are currently zoomed

InstantFireEndTrace

simulated function Object.Vector InstantFireEndTrace (Object.Vector StartTrace)

Overrides: UTWeapon.InstantFireEndTrace

Returns:

end trace position for instantfire()

InstantFireStartTrace

simulated function Object.Vector InstantFireStartTrace ()

Overrides: UTWeapon.InstantFireStartTrace

Overriden to use vehicle starttrace/endtrace locations

Returns:

position of trace start for instantfire()

NotifyVehicleDeployed

simulated function NotifyVehicleDeployed ()

notification that MyVehicle has been deployed/undeployed, since that often changes how its weapon works

NotifyVehicleUndeployed

simulated function NotifyVehicleUndeployed ()


ProjectileFire

simulated function Projectile ProjectileFire ()

Overrides: UTWeapon.ProjectileFire

Create the projectile, but also increment the flash count for remote client effects.

PutDownWeapon

simulated function PutDownWeapon ()

Overrides: Weapon.PutDownWeapon

This function is called to put a weapon down

ServerSetZoom

reliable server function ServerSetZoom (bool bNowZoomed)


StartZoom

simulated function StartZoom (UTPlayerController PC)

Overrides: UTWeapon.StartZoom

(Description copied from UTWeapon.StartZoom)
Called when zooming starts

Parameters:

  • PC - cast of Instigator.Controller for convenience

WeaponPlaySound

simulated function WeaponPlaySound (SoundCue Sound, optional float NoiseLoudness)

Overrides: UTWeapon.WeaponPlaySound

(Description copied from Weapon.WeaponPlaySound)
This function handles playing sounds for weapons. How it plays the sound depends on the following:

If we are a listen server, then this sound is played and replicated as normal If we are a remote client, but locally controlled (ie: we are on the client) we play the sound and don't replicate it If we are a dedicated server, play the sound and replicate it to everyone BUT the owner (he will play it locally).

Parameters:

  • SoundCue - The Source Cue to play