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

UE2:Weapon (U2)

From Unreal Wiki, The Unreal Engine Documentation Site

Jump to: navigation, search
U2 Object >> Actor >> Inventory >> Weapon

Contents

Package: 
Engine
Direct subclasses:
AssaultRifle, DeployableInventory, EnergyRifle, Flamethrower, GrenadeLauncher, Pistol, RocketLauncher, Shotgun, SniperRifle, TurretWeapon
Known custom subclass:
ReloadableWeaponBase
This class in other games:
RTNP, U1, U2XMP, UDK, UE2Runtime, UT, UT2003, UT2004, UT3

Parent class of all weapons. FIXME - should bReplicateInstigator be true???

[edit] Constants

[edit] NUM_AMMO_TYPES

Value: 2


[edit] Properties

[edit] Property group 'Firing'

[edit] DownTime

Type: float


Default value: 0.533

[edit] DownUnloadedTime

Type: float


Default value: 0.533

[edit] ReloadTime

Type: float


Default value: 0.5

[edit] ReloadUnloadedTime

Type: float


Default value: 0.25

[edit] SelectTime

Type: float


Default value: 0.6

[edit] SelectUnloadedTime

Type: float


Default value: 0.6

[edit] Property group 'Weapon'

[edit] BloodEffect

Type: class<Actor>

Array size: 2 (NUM_AMMO_TYPES)


[edit] DirtEffect

Type: class<Actor>

Array size: 2 (NUM_AMMO_TYPES)


[edit] FireSkins

Type: array<Material>

The skin to show when we just fired, and want to make the gun appear brighter from the flash

[edit] FireSkinsTP

Type: array<Material>

The skin to show when we just fired, and want to make the gun appear brighter from the flash (thirdperson)

[edit] MessageNoAmmo

Type: string

Modifiers: localized


Default value: " has no ammo."

[edit] ReloadSound

Type: Sound


[edit] ReloadUnloadedSound

Type: Sound


[edit] SelectSound

Type: Sound


[edit] SparkEffect

Type: class<Actor>

Array size: 2 (NUM_AMMO_TYPES)


[edit] TargetableTypes

Type: array<name>

Types of classes we can target (for crosshair glows).

Default value: 'Pawn'

[edit] Internal variables

See Weapon internal variables.

[edit] Default values

Property Value
AttachmentClass Class'Engine.WeaponAttachment'
bReplicateInstigator True
DrawType DT_Mesh
Icon Texture'Engine.S_Weapon'
InventoryGroup 1
ItemName "Weapon"
PlayerViewOffset
Member Value
X 30.0
Z -5.0
TransientSoundRadius 120.0

[edit] Structs

[edit] TAmmoFlags

Modifiers: native

bool bAmbientFireSound 
bool bRecommendSplashDamage 
bool bWarnTarget 
bool bTossed 
bool bTrySplash 
bool bLeadTarget 
bool bInstantHit 
bool bSplashDamage 
bool bRepeatFire 
automatic refire support
bool bRapidFire 
used by pawn animations in determining firing animation, and for net replication (set for high rate of fire weapons)

[edit] Functions

[edit] Static functions

[edit] IsValidDefaultInventory

static function bool IsValidDefaultInventory (Pawn PlayerPawn)


[edit] Events

[edit] Destroyed

event Destroyed ()

Overrides: Inventory.Destroyed


[edit] PostNetBeginPlay

simulated event PostNetBeginPlay ()

Overrides: Actor.PostNetBeginPlay


[edit] PreBeginPlay

simulated event PreBeginPlay ()

Overrides: Actor.PreBeginPlay


[edit] RenderOverlays

simulated event RenderOverlays (Canvas Canvas)

Overrides: Inventory.RenderOverlays


[edit] Other instance functions

See Weapon instance functions.

[edit] States

[edit] Active

Modifiers: simulated

Ignores: AltFire, Fire

[edit] Active.BeginState

simulated event BeginState ()

Overrides: Object.BeginState (global)


[edit] Active.EndState

simulated event EndState ()

Overrides: Object.EndState (global)


[edit] Active.PutDown

simulated function bool PutDown ()

Overrides: PutDown (global)


[edit] DownWeapon

Modifiers: simulated

Ignores: AltFire, Fire

[edit] DownWeapon.BeginState

simulated event BeginState ()

Overrides: Object.BeginState (global)


[edit] DownWeapon.PutDown

simulated function bool PutDown ()

Overrides: PutDown (global)


[edit] Firing

Modifiers: simulated

Ignores: AltFire, Fire

[edit] Firing.BeginState

simulated event BeginState ()

Overrides: Object.BeginState (global)


[edit] Firing.EndState

simulated event EndState ()

Overrides: Object.EndState (global)


[edit] Firing.Reload

simulated function Reload ()

Overrides: Reload (global)


[edit] Idle

Modifiers: simulated

[edit] Idle.PutDown

simulated function bool PutDown ()

Overrides: PutDown (global)


[edit] PendingClientWeaponSet

[edit] PendingClientWeaponSet.BeginState

simulated event BeginState ()

Overrides: Object.BeginState (global)


[edit] PendingClientWeaponSet.EndState

simulated event EndState ()

Overrides: Object.EndState (global)


[edit] PendingClientWeaponSet.Timer

simulated event Timer ()

Overrides: Actor.Timer (global)


[edit] Reloading

Modifiers: simulated

Ignores: AltFire, Fire, Reload

[edit] Reloading.BeginState

simulated event BeginState ()

Overrides: Object.BeginState (global)


[edit] Reloading.EndState

simulated event EndState ()

Overrides: Object.EndState (global)


[edit] Reloading.CanFire

function bool CanFire ()


[edit] Reloading.PutDown

simulated function bool PutDown ()

Overrides: PutDown (global)


[edit] Reloading.ServerFire

function ServerFire (optional bool bAltFire)

Overrides: ServerFire (global)


Personal tools