Difference between revisions of "FireWeapon"

From GECK

m (Notes: minor typofix)
(Notes)
Line 15: Line 15:
 
=='''Notes'''==
 
=='''Notes'''==
 
*The fired projectile should spawn in the middle of the ref and go straight out in the direction the ref is pointing, UNLESS it has a dummy node called "ProjectileNode" (the name is dependent on the weapon's data in the editor but "ProjectileNode" is the default). If the ref has such a node the projectile will come out of it instead.
 
*The fired projectile should spawn in the middle of the ref and go straight out in the direction the ref is pointing, UNLESS it has a dummy node called "ProjectileNode" (the name is dependent on the weapon's data in the editor but "ProjectileNode" is the default). If the ref has such a node the projectile will come out of it instead.
*If called on the player, and said weapon uses ammo, fireweapon will expend a shot-worth of said ammo
+
*If called on the player, and the player's currently-equipped weapon uses ammo, fireweapon will expend one shot's worth. FireWeapon will also use the spread of any equipped weapon instead of the spread of the firing weapon.
 
*If the weapon has a critical effect or an enchantment, the enchantment will not take effect.
 
*If the weapon has a critical effect or an enchantment, the enchantment will not take effect.
  

Revision as of 20:32, 19 June 2009

Description

FireWeapon fires a projectile from any specified reference.

Syntax

ref.FireWeapon weapon_ID

Examples

Turret01REF.FireWeapon WeapGrenadeFrag

Object named Turret01 will fire a Frag Grenade.

Notes

  • The fired projectile should spawn in the middle of the ref and go straight out in the direction the ref is pointing, UNLESS it has a dummy node called "ProjectileNode" (the name is dependent on the weapon's data in the editor but "ProjectileNode" is the default). If the ref has such a node the projectile will come out of it instead.
  • If called on the player, and the player's currently-equipped weapon uses ammo, fireweapon will expend one shot's worth. FireWeapon will also use the spread of any equipped weapon instead of the spread of the firing weapon.
  • If the weapon has a critical effect or an enchantment, the enchantment will not take effect.

See Also

Personal tools