Difference between revisions of "Fire - Weapon"
Jump to navigation
Jump to search
imported>Fg109 (added notes) |
imported>Fg109 m (→Notes) |
||
Line 30: | Line 30: | ||
== Notes == | == Notes == | ||
*If akSource is not equipped with any ammo, and akAmmo is none, nothing happens. | *If akSource is not equipped with any ammo, and akAmmo is none, nothing happens. | ||
*If akSource is not equipped with any ammo, and akAmmo is not none, then akSource will fire akAmmo, without depleting | *If akSource is not equipped with any ammo, and akAmmo is not none, then akSource will fire akAmmo, without depleting any ammo reserves (infinite ammo). | ||
*If akSource is equipped with ammo, and akAmmo is a different ammo, then akSource will fire | *If akSource is equipped with ammo, and akAmmo is a different ammo, then akSource will fire akAmmo, while depleting the current supply of equipped ammo. | ||
*If akSource is not equipped with a weapon normally capable of firing, then the weapon's model becomes invisible (model is unloaded) until it is unequipped. | *If akSource is not equipped with a weapon normally capable of firing, then the weapon's model becomes invisible (model is unloaded) until it is unequipped. | ||
== See Also == | == See Also == | ||
*[[Weapon Script]] | *[[Weapon Script]] |
Latest revision as of 00:42, 5 April 2012
Member of: Weapon Script
Fires the weapon from the the specified object reference, using the specified ammo.
Syntax[edit | edit source]
Function Fire(ObjectReference akSource, Ammo akAmmo = None) native
Parameters[edit | edit source]
- akSource: The ObjectReference to fire the weapon from.
- akAmmo: The Ammo to use. If None is passed, it will use the current ammo on the reference (this will throw a warning if the reference is not an actor).
Return Value[edit | edit source]
None.
Examples[edit | edit source]
; Have the bandit fire his bow with his current ammo
Bow.Fire(Bandit)
; Have the box fire the bow with the poison arrows ammo
Bow.Fire(Box, PoisonArrows)
Notes[edit | edit source]
- If akSource is not equipped with any ammo, and akAmmo is none, nothing happens.
- If akSource is not equipped with any ammo, and akAmmo is not none, then akSource will fire akAmmo, without depleting any ammo reserves (infinite ammo).
- If akSource is equipped with ammo, and akAmmo is a different ammo, then akSource will fire akAmmo, while depleting the current supply of equipped ammo.
- If akSource is not equipped with a weapon normally capable of firing, then the weapon's model becomes invisible (model is unloaded) until it is unequipped.