LuaDocs/HDFirearm

From Data Realms Wiki

(Difference between revisions)
Jump to: navigation, search
(HDFirearm - Automatically generated by LuaBot)
(HDFirearm - Automatically generated by LuaBot)
Line 11: Line 11:
===ClassName===
===ClassName===
The class name of this Entity.A string with the friendly-formatted type name of this object.
The class name of this Entity.A string with the friendly-formatted type name of this object.
 +
 +
===RateOfFire===
 +
The rate of fire of this. 0 means it is semi auto. (ie only one discharge per activation).The rate of fire, in rounds per min. If 0, firearm is semi-automatic.
 +
 +
===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.
 +
[[LuaDocs/Index|'''Go back to Class Index''']]
[[LuaDocs/Index|'''Go back to Class Index''']]

Revision as of 22:58, 10 May 2011

Contents

Parent: HeldDevice

Concrete Class. A firearm device that fires projectile MO's and discharges shell MO's.

Go back to Class Index


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. 0 means it is semi auto. (ie only one discharge per activation).The rate of fire, in rounds per min. If 0, firearm is semi-automatic.

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.


Go back to Class Index

Personal tools