LuaDocs/HDFirearm
From Data Realms Wiki
Contents |
Parent: HeldDevice
Concrete Class. A firearm device that fires projectile MO's and discharges shell MO's.
Properties
ClassName
The class name of this Entity.A string with the friendly-formatted type name of this object.
RateOfFire
The rate of fire of this. This applies even if semi-auto.. it limits how quickly a new round can be fired after the last.The rate of fire, in rounds per min.
FullAuto
Read-only property. Tells whether the device is fully automatic or not.Whether the player can hold down fire and this will fire repeatedly.
RoundInMagCount
Read-only property. The number of rounds still in the loaded magazine. Negative value means infinite ammo.An int with the number of rounds in the magazine currently in this HDFirearm. Negative means infinite ammo.
Magazine
Read-only property. The currently attached Magazine, if any.The Magazine, if any is attached.
Functions
SetNextMagazineName
Sets the Preset name of the next Magazine that will be loaded into this gun. This changes all future mags that will be reloaded.
Arguments:
- The preset name of the new Magazine to load into this from now on.
Return value:
Whether the specified magazine was found and successfully prepared.