Difference between revisions of "FireWeapon"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Talkie Toaster
m
imported>Ez0n3
 
Line 1: Line 1:
=='''Description'''==
{{Function
 
|origin = GECK1
[[FireWeapon]] fires a projectile from any specified reference.
|summary = [[FireWeapon]] fires a projectile from any specified reference.
 
|name = FireWeapon
=='''Syntax'''==
|returnType = void
 
|referenceType = [ActorRefID]
  ref.FireWeapon weapon_ID
  |arguments =
 
  {{FunctionArgument
=='''Examples'''==
  |Name = WeaponID
 
  |Type = ref
  Turret01REF.FireWeapon WeapGrenadeFrag
  }}
 
  |example = Turret01REF.FireWeapon WeapGrenadeFrag
Object named Turret01 will fire a Frag Grenade.
Object named Turret01 will fire a Frag Grenade.
}}


=='''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 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 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.
Line 19: Line 20:
*If the weapon has an enchantment, it will not take effect.
*If the weapon has an enchantment, it will not take effect.


== See Also ==
==See Also==
*[[UseWeapon]]
*[[UseWeapon]]



Latest revision as of 09:23, 15 January 2011

< [[::Category:Functions|Category:Functions]]

A function included in the GECK version 1.1.0.36.

Description

FireWeapon fires a projectile from any specified reference.

Syntax

[help]
[ActorRefID].FireWeapon WeaponID:ref

Example

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 called on the player, and the fired weapon is a Grenade-type weapon with Ammo Use set to 1, the player's weapon art will vanish. It'll reappear after unequipping and reequipping.
  • If the weapon has an enchantment, it will not take effect.

See Also