Mostly Harmless

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[edit]

AimingTraceIgnoredActors[edit]

Type: array<Actor>

actors that the aiming trace should ignore

AimTraceRange[edit]

Type: float

cached max range of the weapon used for aiming traces

AltFireTriggerTags[edit]

Type: array<name>

Triggers that should be activated when a weapon fires

AltImpactEffects[edit]

Type: array<UTPawn.MaterialImpactEffect>

impact effects by material type

bCurrentlyZoomed[edit]

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[edit]

Type: bool

for debugging turret aiming

bIgnoreDownwardPitch[edit]

Type: bool

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

bIgnoreSocketPitchRotation[edit]

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[edit]

Type: bool


BulletWhip[edit]

Type: SoundCue

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

CurrentCrosshairScaling[edit]

Type: float


DefaultAltImpactEffect[edit]

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[edit]

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[edit]

Type: array<name>

Triggers that should be activated when a weapon fires

ImpactEffects[edit]

Type: array<UTPawn.MaterialImpactEffect>

impact effects by material type

LastCorrectAimTime[edit]

Type: float

last time aim was correct, used for looking up GoodAimColor

LastInCorrectAimTime[edit]

Type: float

last time aim was incorrect, used for looking up GoodAimColor

MaxFinalAimAdjustment[edit]

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[edit]

Type: UTVehicle

Modifiers: repnotify

Holds a link to the parent vehicle

SeatIndex[edit]

Type: int

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

VehicleClass[edit]

Type: class<UTVehicle>

Vehicle class used for drawing kill icons

Default values[edit]

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

Functions[edit]

Static functions[edit]

DrawKillIcon[edit]

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

Overrides: UTWeapon.DrawKillIcon


GetFireTriggerTag[edit]

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


GetImpactEffect[edit]

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[edit]

GetDesiredAimPoint[edit]

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[edit]

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[edit]

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[edit]

simulated event PostBeginPlay ()

Overrides: UTWeapon.PostBeginPlay

Initialize the weapon

Other instance functions[edit]

Activate[edit]

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[edit]

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[edit]

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[edit]

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[edit]

simulated function DetachWeapon ()

Overrides: UTWeapon.DetachWeapon

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

Parameters:

  • SkeletalMeshComponent - weapon is attached to.

DrawTowingIndicator[edit]

simulated function DrawTowingIndicator (HUD HUD, float CenterSize)


DrawWeaponCrosshair[edit]

simulated function DrawWeaponCrosshair (HUD HUD)

Overrides: UTWeapon.DrawWeaponCrosshair

Draw the Crosshairs

EndFire[edit]

simulated function EndFire (byte FireModeNum)

Overrides: UTWeapon.EndFire

We Override endfire to add support for zooming

EndZoom[edit]

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[edit]

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[edit]

simulated function GetCrosshairScaling (HUD HUD)


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.

Parameters:

  • FireModeNum - fire mode

Returns:

Period in seconds of firing mode

GetFireStartLocationAndRotation[edit]

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

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

GetMaxFinalAimAdjustment[edit]

simulated function float GetMaxFinalAimAdjustment ()


GetTraceOwner[edit]

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[edit]

simulated function UTWeapon.EZoomState GetZoomedState ()

Overrides: UTWeapon.GetZoomedState

Returns true if we are currently zoomed

InstantFireEndTrace[edit]

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

Overrides: UTWeapon.InstantFireEndTrace

Returns:

end trace position for instantfire()

InstantFireStartTrace[edit]

simulated function Object.Vector InstantFireStartTrace ()

Overrides: UTWeapon.InstantFireStartTrace

Overriden to use vehicle starttrace/endtrace locations

Returns:

position of trace start for instantfire()

NotifyVehicleDeployed[edit]

simulated function NotifyVehicleDeployed ()

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

NotifyVehicleUndeployed[edit]

simulated function NotifyVehicleUndeployed ()


ProjectileFire[edit]

simulated function Projectile ProjectileFire ()

Overrides: UTWeapon.ProjectileFire

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

PutDownWeapon[edit]

simulated function PutDownWeapon ()

Overrides: Weapon.PutDownWeapon

This function is called to put a weapon down

ServerSetZoom[edit]

reliable server function ServerSetZoom (bool bNowZoomed)


StartZoom[edit]

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[edit]

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