LuaDocs/HDFirearm

From Data Realms Wiki

(Difference between revisions)
Jump to: navigation, search
(HDFirearm - Automatically generated by LuaBot)
(HDFirearm - Automatically generated by LuaBot)
 
(3 intermediate revisions not shown)
Line 13: Line 13:
===RateOfFire===
===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.
+
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===
===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.
+
Tells whether the device is fully automatic or not.Whether the player can hold down fire and this will fire repeatedly.
===RoundInMagCount===
===RoundInMagCount===
Line 23: Line 23:
===Magazine===
===Magazine===
Read-only property. The currently attached Magazine, if any.The Magazine, if any is attached.
Read-only property. The currently attached Magazine, if any.The Magazine, if any is attached.
 +
 +
===ActivationDelay===
 +
The delay before firing.An int with the activation delay in ms.
 +
 +
===DeactivationDelay===
 +
The delay between release of activation and another can be started.An int with the delay in ms.
 +
 +
===ReloadTime===
 +
The reload time in ms.An int in ms.
 +
 +
===ShakeRange===
 +
The range of normal shaking of entire weapon.A float with the range in degrees.
 +
 +
===SharpShakeRange===
 +
The range of shaking of entire weapon during sharp aiming.A float with the range in degrees.
 +
 +
===NoSupportFactor===
 +
The factor for how much more weapon shakes if it isn't supported by a second hand.A float with the factor.
 +
 +
===ParticleSpreadRange===
 +
The range of spread angle of fired particles, in one direction.A float with the range in degrees.
==Functions==
==Functions==
 +
===GetAIFireVel===
 +
Gets the velocity the AI use when aiming this weapon.
 +
 +
'''Arguments:'''
 +
 +
* None.
 +
 +
'''Return value:'''
 +
 +
A float with the velocity in m/s.
 +
 +
 +
===GetAIBulletLifeTime===
 +
Gets the bullet life time the AI use when aiming this weapon.
 +
 +
'''Arguments:'''
 +
 +
* None.
 +
 +
'''Return value:'''
 +
 +
A float with the life time in ms.
 +
 +
 +
===GetBulletAccScalar===
 +
Gets the bullet acceleration scalar the AI use when aiming this weapon.
 +
 +
'''Arguments:'''
 +
 +
* None.
 +
 +
'''Return value:'''
 +
 +
A float with the scalar.
 +
 +
 +
===GetAIBlastRadius===
 +
Gets the blast radius the AI use when aiming this weapon.
 +
 +
'''Arguments:'''
 +
 +
* None.
 +
 +
'''Return value:'''
 +
 +
A float with the blast radius in pixels.
 +
 +
 +
===GetAIPenetration===
 +
Gets how much material the projectiles from this weapon can destory.
 +
 +
'''Arguments:'''
 +
 +
* None.
 +
 +
'''Return value:'''
 +
 +
A float with the material strength.
 +
 +
 +
===CompareTrajectories===
 +
Estimates how close the projectiles from two weapons will land.
 +
 +
'''Arguments:'''
 +
 +
* A HDFirearm pointer to compare with.
 +
 +
'''Return value:'''
 +
 +
A float with the distance in pixels.
 +
 +
===SetNextMagazineName===
===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.
Sets the Preset name of the next Magazine that will be loaded into this gun. This changes all future mags that will be reloaded.

Latest revision as of 20:18, 2 April 2015

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. 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

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.

ActivationDelay

The delay before firing.An int with the activation delay in ms.

DeactivationDelay

The delay between release of activation and another can be started.An int with the delay in ms.

ReloadTime

The reload time in ms.An int in ms.

ShakeRange

The range of normal shaking of entire weapon.A float with the range in degrees.

SharpShakeRange

The range of shaking of entire weapon during sharp aiming.A float with the range in degrees.

NoSupportFactor

The factor for how much more weapon shakes if it isn't supported by a second hand.A float with the factor.

ParticleSpreadRange

The range of spread angle of fired particles, in one direction.A float with the range in degrees.


Functions

GetAIFireVel

Gets the velocity the AI use when aiming this weapon.

Arguments:

  • None.

Return value:

A float with the velocity in m/s.


GetAIBulletLifeTime

Gets the bullet life time the AI use when aiming this weapon.

Arguments:

  • None.

Return value:

A float with the life time in ms.


GetBulletAccScalar

Gets the bullet acceleration scalar the AI use when aiming this weapon.

Arguments:

  • None.

Return value:

A float with the scalar.


GetAIBlastRadius

Gets the blast radius the AI use when aiming this weapon.

Arguments:

  • None.

Return value:

A float with the blast radius in pixels.


GetAIPenetration

Gets how much material the projectiles from this weapon can destory.

Arguments:

  • None.

Return value:

A float with the material strength.


CompareTrajectories

Estimates how close the projectiles from two weapons will land.

Arguments:

  • A HDFirearm pointer to compare with.

Return value:

A float with the distance in pixels.


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