The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall

UE3:UTWeaponAttachment (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> Actor >> UTWeaponAttachment
Package: 
UTGame
Direct subclasses:
UTAttachment_RocketLauncher, UTAttachment_ShockRifle, UTBeamWeaponAttachment
This class in other games:
UT3


Properties[edit]

AltFireAnim[edit]

Type: name

anims to play when firing

AltImpactEffects[edit]

Type: array<UTPawn.MaterialImpactEffect>

impact effects by material type

AttachmentSocket[edit]

Type: name


bAlignToSurfaceNormal[edit]

Type: bool


Default value: True

bMakeSplash[edit]

Type: bool

If true, make splash effect for local player when hit water

bMuzzleFlashPSCLoops[edit]

Type: bool


bSuppressSounds[edit]

Type: bool


BulletWhip[edit]

Type: SoundCue

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

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

DistFactorForRefPose[edit]

Type: float

When the DistanceFactor for this weapon drops below this, force it into the ref pose (don't do animations etc)

Default value: 0.14

FireAnim[edit]

Type: name

anims to play when firing

ImpactEffects[edit]

Type: array<UTPawn.MaterialImpactEffect>

impact effects by material type

MaxDecalRangeSq[edit]

Type: float


Default value: 1.6E7

MaxFireEffectDistance[edit]

Type: float


Default value: 5000.0

MaxImpactEffectDistance[edit]

Type: float


Default value: 4000.0

Mesh[edit]

Type: SkeletalMeshComponent

Weapon SkelMesh

Default value: SkeletalMeshComponent'SkeletalMeshComponent0'

MuzzleFlashAltPSCTemplate[edit]

Type: ParticleSystem


MuzzleFlashColor[edit]

Type: Object.Color


Default value:

Member Value
A 255
B 255
G 255
R 255

MuzzleFlashDuration[edit]

Type: float

How long the Muzzle Flash should be there

Default value: 0.3

MuzzleFlashLight[edit]

Type: UTExplosionLight


MuzzleFlashLightClass[edit]

Type: class<UTExplosionLight>

dynamic light

MuzzleFlashPSC[edit]

Type: ParticleSystemComponent

Muzzle flash PSC and Templates

MuzzleFlashPSCTemplate[edit]

Type: ParticleSystem


MuzzleFlashSocket[edit]

Type: name

Holds the name of the socket to attach a muzzle flash too

OverlayMesh[edit]

Type: SkeletalMeshComponent

Modifiers: protected

mesh for overlay - Each weapon will need to add it's own overlay mesh in it's default props

OwnerMesh[edit]

Type: SkeletalMeshComponent

TEMP for guns with no muzzleflash socket

SplashEffect[edit]

Type: class<Actor>

Animations and Sounds

WeapAnimType[edit]

Type: UTPawn.EWeapAnimType


WeaponClass[edit]

Type: class<UTWeapon>


Default values[edit]

Property Value
bReplicateInstigator True
CollisionType COLLIDE_CustomDefault
NetUpdateFrequency 10.0
TickGroup TG_DuringAsyncWork

Subobjects[edit]

SkeletalMeshComponent0[edit]

Class: Engine.SkeletalMeshComponent

Property Value
Animations UTAnimNodeSequence'UTGame.Default__UTWeaponAttachment:MeshSequenceA'
bForceRefpose 1
bIgnoreControllersWhenNotRendered True
bOverrideAttachmentOwnerVisibility True
bOwnerNoSee True
bUpdateSkelWhenNotRendered False
bUseAsOccluder False
CachedMaxDrawDistance 4000.0
MaxDrawDistance 4000.0
ReplacementPrimitive None

Functions[edit]

Events[edit]

PostBeginPlay[edit]

simulated event PostBeginPlay ()

Overrides: Actor.PostBeginPlay


StopThirdPersonFireEffects[edit]

simulated event StopThirdPersonFireEffects ()


Other instance functions[edit]

AllowImpactEffects[edit]

simulated function bool AllowImpactEffects (Actor HitActor, Object.Vector HitLocation, Object.Vector HitNormal)


AttachTo[edit]

simulated function AttachTo (UTPawn OwnerPawn)

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

CauseMuzzleFlash[edit]

simulated function CauseMuzzleFlash ()

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

ChangeVisibility[edit]

simulated function ChangeVisibility (bool bIsVisible)


CheckBulletWhip[edit]

simulated function CheckBulletWhip (Object.Vector FireDir, Object.Vector HitLocation)


CheckToForceRefPose[edit]

simulated function CheckToForceRefPose ()


CreateOverlayMesh[edit]

simulated function CreateOverlayMesh ()


DetachFrom[edit]

simulated function DetachFrom (SkeletalMeshComponent MeshCpnt)

Detach weapon from skeletal mesh

EffectIsRelevant[edit]

simulated function bool EffectIsRelevant (Object.Vector SpawnLocation, bool bForceDedicated, optional float CullDistance)

Overrides: Actor.EffectIsRelevant


FireModeUpdated[edit]

simulated function FireModeUpdated (byte FiringMode, bool bViaReplication)


FirstPersonFireEffects[edit]

simulated function FirstPersonFireEffects (Weapon PawnWeapon, Object.Vector HitLocation)

The Weapon attachment, though hidden, is also responsible for controlling the first person effects for a weapon.

GetEffectLocation[edit]

simulated function Object.Vector GetEffectLocation ()

Returns:

the starting location for effects (generally tracers)

GetImpactEffect[edit]

simulated function UTPawn.MaterialImpactEffect GetImpactEffect (PhysicalMaterial HitMaterial)

returns the impact sound that should be used for hits on the given physical material

MuzzleFlashTimer[edit]

simulated function MuzzleFlashTimer ()

Turns the MuzzleFlashlight off

PlayImpactEffects[edit]

simulated function PlayImpactEffects (Object.Vector HitLocation)

Spawn any effects that occur at the impact point. It's called from the pawn.

SetImpactedActor[edit]

simulated function SetImpactedActor (Actor HitActor, Object.Vector HitLocation, Object.Vector HitNormal)


SetMuzzleFlashParams[edit]

simulated function SetMuzzleFlashParams (ParticleSystemComponent PSC)

Allows a child to setup custom parameters on the muzzle flash

SetPuttingDownWeapon[edit]

simulated function SetPuttingDownWeapon (bool bNowPuttingDown)

sets whether the weapon is being put away

SetSkin[edit]

function SetSkin (Material NewMaterial)


SetWeaponOverlayFlags[edit]

simulated function SetWeaponOverlayFlags (UTPawn OwnerPawn)


SplitScreenEffects[edit]

simulated function SplitScreenEffects (Object.Vector HitLocation)

Optimized equivalent of calling ThirdPersonFireEffects while in splitscreen

StopFirstPersonFireEffects[edit]

simulated function StopFirstPersonFireEffects (Weapon PawnWeapon)


StopMuzzleFlash[edit]

simulated function StopMuzzleFlash ()

Stops the muzzle flash

ThirdPersonFireEffects[edit]

simulated function ThirdPersonFireEffects (Object.Vector HitLocation)

Spawn all of the effects that will be seen in behindview/remote clients. This function is called from the pawn, and should only be called when on a remote client or if the local client is in a 3rd person mode.

States[edit]

CurrentlyAttached[edit]

When an attachment is attached to a pawn, it enters the CurrentlyAttached state.