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

UE1:AutoMag (U1)

From Unreal Wiki, The Unreal Engine Documentation Site

Jump to: navigation, search
U1 Object >> Actor >> Inventory >> Weapon >> AutoMag

Contents

Package: 
UnrealShare
This class in other games:
RTNP, UT

Implementation of the Automag pistol.

[edit] Properties

[edit] Property group 'AutoMag'

[edit] hitdamage

Type: int

The damage done per hit.

Default value: 17

[edit] Internal variables

[edit] AltAccuracy

Type: float

Current aim accuracy in alternate fire mode. Starts at 0.4 and increases by 0.5 after every shot up to 3.4.

[edit] ClipCount

Type: int

The ammo used from the current clip. After 20 shots, a reload animation is played and the ClipCount is reset to 0.

[edit] Default values

Property Value
AIRating 0.2
AltFireSound Sound'UnrealShare.AutoMag.shot'
AltRefireRate 0.9
AmmoName Class'UnrealShare.Shellbox'
AutoSwitchPriority 2
bAltInstantHit True
bInstantHit True
bNoSmooth False
CockingSound Sound'UnrealShare.AutoMag.Cocking'
CollisionHeight 10.0
CollisionRadius 25.0
DeathMessage "%o got gatted by %k's %w."
FireOffset
Member Value
Y -10.0
Z -4.0
FireSound Sound'UnrealShare.AutoMag.shot'
InventoryGroup 2
ItemName "Automag"
Mass 15.0
Mesh LodMesh'UnrealShare.AutoMagPickup'
Misc1Sound Sound'UnrealShare.flak.Click'
Misc2Sound Sound'UnrealShare.AutoMag.Reload'
PickupAmmoCount 20
PickupMessage "You got the AutoMag"
PickupSound Sound'UnrealShare.Pickups.WeaponPickup'
PickupViewMesh LodMesh'UnrealShare.AutoMagPickup'
PlayerViewMesh LodMesh'UnrealShare.AutoMagL'
PlayerViewOffset
Member Value
X 4.8
Y -1.7
Z -2.7
RefireRate 0.7
SelectSound Sound'UnrealShare.AutoMag.Cocking'
ShakeMag 200.0
ShakeVert 4.0
ThirdPersonMesh LodMesh'UnrealShare.auto3rd'

[edit] Instance functions

[edit] AltFire

function AltFire (float Value)

Overrides: Weapon.AltFire

Resets the AltAccuracy to 0.4 and sends the weapon into AltFiring mode if it still has ammo.

[edit] Finish

function Finish ()

Overrides: Weapon.Finish


[edit] PlayAltFiring

function PlayAltFiring ()

Overrides: Weapon.PlayAltFiring


[edit] PlayFiring

function PlayFiring ()

Overrides: Weapon.PlayFiring


[edit] PlayPostSelect

function PlayPostSelect ()

Overrides: Weapon.PlayPostSelect


[edit] ProcessTraceHit

function ProcessTraceHit (Actor Other, Object.Vector HitLocation, Object.Vector HitNormal, Object.Vector X, Object.Vector Y, Object.Vector Z)

Overrides: Weapon.ProcessTraceHit


[edit] setHand

function setHand (float Hand)

Overrides: Weapon.setHand


[edit] States

[edit] AltFiring

Implements the alternate firing mode logic.

Inherits from: Weapon.AltFiring

Ignores: AltFiring.AltFire, AltFiring.Fire

[edit] Idle

[edit] Idle.AnimEnd

event AnimEnd ()

Overrides: Weapon.Idle.AnimEnd


[edit] Idle.Timer

event Timer ()

Overrides: Actor.Timer (global)


[edit] Idle.PutDown

function bool PutDown ()

Overrides: Weapon.Idle.PutDown


[edit] NewClip

Implements the reload logic. Plays the clip eject animation, puts down the weapon, resets the clip count and brings up the weapon again before allowing the player to fire again.

Ignores: AltFire, Fire

[edit] NormalFire

Implements the primary fire mode logic. At a ClipCount higher than 15, a click sound is played, and if it reaches 20, the reload logic is activated.