WeaponFire
Weapons in UT2004 have been divided up into multiple actors, of which this one is intimately involved. WeaponFire actors and their children form the FireMode[i] array in Weapon which manifests itself on the screen as the different modes of firing a weapon can do (typically the primary and secondary fire). The properties for the firing of a weapon reside in the weaponfire classes, including fire rate, damage, etc.
Properties
- bool bSplashDamage
- bool bSplashJump
- bool bRecommendSplashDamage
- bool bTossed
- bool bLeadTarget
- bool bInstantHit
other useful stuff
- bool bPawnRapidFireAnim
- for determining what anim the firer should play
- bool bReflective
- bool bTimerLoop
- bool bFireOnRelease
- if true, shot will be fired when button is released, HoldTime will be the time the button was held for
- bool bWaitForRelease
- if true, fire button must be released between each shot
- bool bModeExclusive
- if true, no other fire modes can be active at the same time as this one
- bool bIsFiring
- bool bNowWaiting
- bool bServerDelayStopFire
- bool bServerDelayStartFire
- bool bInstantStop
muzzle flash & smoke
- bool bAttachSmokeEmitter
- bool bAttachFlashEmitter
timer
- float TimerInterval
- float NextTimerPop
- Weapon Weapon
- Pawn Instigator
- LevelInfo Level
- Actor Owner
- float NextFireTime
- float PreFireTime
- seconds before first shot
- float MaxHoldTime
- float HoldTime
- int ThisModeNum
- float TransientSoundVolume
- float TransientSoundRadius
animation
- name PreFireAnim
- name FireAnim
- name FireLoopAnim
- name FireEndAnim
- name ReloadAnim
- float PreFireAnimRate
- float FireAnimRate
- float FireLoopAnimRate
- float FireEndAnimRate
- float ReloadAnimRate
- float TweenTime
Sound
ForceFeedback
- string FireForce
- string ReloadForce
- string NoAmmoForce
Timing
- float FireRate
- seconds between shots
- float ServerStartFireTime
Ammo
- class<Ammunition> AmmoClass
- int AmmoPerFire
- int AmmoClipSize
- float Load
camera shakes
- vector ShakeRotMag
- how far to rot view
- vector ShakeRotRate
- how fast to rot view
- float ShakeRotTime
- how much time to rot the instigator's view
- vector ShakeOffsetMag
- max view offset vertically
- vector ShakeOffsetRate
- how fast to offset view vertically
- float ShakeOffsetTime
- how much time to offset view
AI
- class<Projectile> ProjectileClass
- float BotRefireRate
- float WarnTargetPct
- class<xEmitter> FlashEmitterClass
- xEmitter FlashEmitter
- class<xEmitter> SmokeEmitterClass
- xEmitter SmokeEmitter
- float AimError
- 0=none 1000=quite a bit
- float Spread
- rotator units. no relation to AimError
- enum ESpreadStyle (SpreadStyle)
- SS_None
- SS_Random
- spread is max random angle deviation
- SS_Line
- spread is angle between each projectile
- SS_Ring
Known Subclasses
- WeaponFire
- BallTarget?
- FM_Turret_AltFire_Shield?
- FM_Turret_AltFire_Minigun?
- InstantFire
- AssualtFire?
- ClassicSniperFire?
- FM_SpaceFighter_InstantHitLaser?
- FM_Turret_IonCannon_Fire?
- FM_Turret_Minigun_Fire?
- MinigunFire
- ShockBeamFire
- SniperFire?
- LinkFire?
- PainterFire?
- PainterZoom?
- ProjectileFire
- ShieldAltFire?
- ShieldFire?
- SniperZoom?
- TransRecall?
Related Topics
OlympusMons: Need to get some stuff happening for the ut2004 weaponfire class. Ok so I did pretty much straight from the source but comments will be addded. I wouldnt mind adding a few tutorials in this area for multi-ammo weapons, reloading and spreadfire weapons like shotguns. I have some basic code of my own for ut2004 for these but its still a bit buggy so until I get things ironed out I wont waste your time.
OlympusMons: Ok so I linked the subclasses, Im guessing that they are all very similar to the ut2003 ones so it shouldnt cause any big problems as most of the functionality of weaponfire is similar, except the inclusion of a few functions like trace etc to get the firemodes to operate correctly as subclasses of object. I'll try to update the subclasses with ut2004 info as needed.
Category Class (UT2004)
Category Class Tree
Category To Do – add functions and bring properties into standard format