I don't need to test my programs. I have an error-correcting modem.

UE3:UTWeaponAttachment (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT3 Object >> Actor >> UTWeaponAttachment
Package: 
UTGame
Direct subclasses:
UTAttachment_ShapedCharge, UTAttachment_Avril, UTAttachment_SpiderMineTrap, UTAttachment_BioRifle, UTAttachment_EMPMine, UTAttachment_EnergyShield, UTAttachment_FlakCannon, UTAttachment_ImpactHammer, UTAttachment_InstagibRifle, UTAttachment_Enforcer, UTAttachment_Redeemer, UTAttachment_RocketLauncher, UTAttachment_ShockRifle, UTAttachment_SlowVolume, UTAttachment_Stinger, UTAttachment_Translocator, UTAttachment_SniperRifle, UTBeamWeaponAttachment, UTAttachment_LinkGenerator
This class in other games:
UDK

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

Properties

AltFireAnim

Type: name

anims to play when firing

AltImpactEffects

Type: array<UTPhysicalMaterialProperty.MaterialImpactEffect>

impact effects by material type

AttachmentSocket

Type: name


bAlignToSurfaceNormal

Type: bool


Default value: True

bMakeSplash

Type: bool

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

bMuzzleFlashPSCLoops

Type: bool


bSuppressSounds

Type: bool


BulletWhip

Type: SoundCue

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

DefaultAltImpactEffect

Type: UTPhysicalMaterialProperty.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: UTPhysicalMaterialProperty.MaterialImpactEffect

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

Default value:

Member Value
DecalDissolveParamName 'DissolveAmount'
DurationOfDecal 4.0

DistFactorForRefPose

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

Type: name

anims to play when firing

ImpactEffects

Type: array<UTPhysicalMaterialProperty.MaterialImpactEffect>

impact effects by material type

MaxDecalRangeSq

Type: float


Default value: 1.6E7

MaxFireEffectDistance

Type: float


Default value: 5000.0

MaxImpactEffectDistance

Type: float


Default value: 4000.0

Mesh

Type: SkeletalMeshComponent

Weapon SkelMesh

Default value: SkeletalMeshComponent'SkeletalMeshComponent0'

MuzzleFlashAltPSCTemplate

Type: ParticleSystem


MuzzleFlashColor

Type: Object.Color


Default value:

Member Value
A 255
B 255
G 255
R 255

MuzzleFlashDuration

Type: float

How long the Muzzle Flash should be there

Default value: 0.3

MuzzleFlashLight

Type: UTExplosionLight


MuzzleFlashLightClass

Type: class<UTExplosionLight>

dynamic light

MuzzleFlashPSC

Type: ParticleSystemComponent

Muzzle flash PSC and Templates

MuzzleFlashPSCTemplate

Type: ParticleSystem


MuzzleFlashSocket

Type: name

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

OverlayMesh

Type: SkeletalMeshComponent

Modifiers: protected

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

OwnerMesh

Type: SkeletalMeshComponent

TEMP for guns with no muzzleflash socket

SplashEffect

Type: class<Actor>

Animations and Sounds

WeapAnimType

Type: EWeapAnimType

Anim

WeaponClass

Type: class<UTWeapon>


Default values

Property Value
bReplicateInstigator True
CollisionType COLLIDE_CustomDefault
NetUpdateFrequency 10.0
TickGroup TG_DuringAsyncWork

Subobjects

SkeletalMeshComponent0

Class: Engine.SkeletalMeshComponent

Property Value
Animations UTAnimNodeSequence'UTGame.Default__UTWeaponAttachment:MeshSequenceA'
bForceRefpose 1
bIgnoreControllersWhenNotRendered True
bOverrideAttachmentOwnerVisibility True
bOwnerNoSee True
bUpdateSkelWhenNotRendered False
bUseAsOccluder False
CachedCullDistance 4000.0
CullDistance 4000.0

Enums

EWeapAnimType

Anim

EWAT_Default 
EWAT_Pistol 
EWAT_DualPistols 
EWAT_ShoulderRocket 
EWAT_Stinger 

Functions

Events

PostBeginPlay

simulated event PostBeginPlay ()

Overrides: Actor.PostBeginPlay


StopThirdPersonFireEffects

simulated event StopThirdPersonFireEffects ()


Other instance functions

AllowImpactEffects

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


AttachTo

simulated function AttachTo (UTPawn OwnerPawn)

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

CauseMuzzleFlash

simulated function CauseMuzzleFlash ()

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

ChangeVisibility

simulated function ChangeVisibility (bool bIsVisible)


CheckBulletWhip

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


CheckToForceRefPose

simulated function CheckToForceRefPose ()


CreateOverlayMesh

simulated function CreateOverlayMesh ()


DetachFrom

simulated function DetachFrom (SkeletalMeshComponent MeshCpnt)

Detach weapon from skeletal mesh

EffectIsRelevant

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

Overrides: Actor.EffectIsRelevant


FireModeUpdated

simulated function FireModeUpdated (byte FiringMode, bool bViaReplication)


FirstPersonFireEffects

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

simulated function Object.Vector GetEffectLocation ()

Returns:

the starting location for effects (generally tracers)

GetImpactEffect

simulated function UTPhysicalMaterialProperty.MaterialImpactEffect GetImpactEffect (PhysicalMaterial HitMaterial)

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

MuzzleFlashTimer

simulated function MuzzleFlashTimer ()

Turns the MuzzleFlashlight off

PlayImpactEffects

simulated function PlayImpactEffects (Object.Vector HitLocation)

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

SetDualWielding

simulated function SetDualWielding (bool bNowDual)

sets whether the weapon is being dual wielded

SetImpactedActor

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


SetMuzzleFlashParams

simulated function SetMuzzleFlashParams (ParticleSystemComponent PSC)

Allows a child to setup custom parameters on the muzzle flash

SetPuttingDownWeapon

simulated function SetPuttingDownWeapon (bool bNowPuttingDown)

sets whether the weapon is being put away

SetSkin

function SetSkin (Material NewMaterial)


SetWeaponOverlayFlags

simulated function SetWeaponOverlayFlags (UTPawn OwnerPawn)


SplitScreenEffects

simulated function SplitScreenEffects (Object.Vector HitLocation)

Optimized equivalent of calling ThirdPersonFireEffects while in splitscreen

StopFirstPersonFireEffects

simulated function StopFirstPersonFireEffects (Weapon PawnWeapon)


StopMuzzleFlash

simulated function StopMuzzleFlash ()

Stops the muzzle flash

ThirdPersonFireEffects

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

CurrentlyAttached

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