Difference between revisions of "UseWeapon (Function)"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Kkuhlmann
 
imported>Th1nk
m (Th1nk moved page Nuke grenade (boom) to UseWeapon (Function) over redirect: Undoing Vandal Move.)
 
(10 intermediate revisions by 6 users not shown)
Line 1: Line 1:
=='''Syntax'''==
[''ActorREF''.]UseWeapon ''WeapontoUse WhereToStand Target NumberOfShots/Hits [CrouchToReload] [HoldFire] [AlwaysHit] [DoNoDamage] [TargetShouldBeHere] ''
=='''Description'''==
=='''Description'''==


Line 11: Line 15:
* whether to prevent all damage [for scripted protracted fake combat; otpional, default is false]
* whether to prevent all damage [for scripted protracted fake combat; otpional, default is false]
* where the target needs to stand [optional, default/NULL means "anywhere"]  
* where the target needs to stand [optional, default/NULL means "anywhere"]  
=='''Syntax'''==
[''ActorREF''.]UseWeapon ''WeapontoUse WhereToStand WhatToShoot ShotsToFire [CrouchToReload] [HoldFire] [AlwaysHit] [DoNoDamage] [TargetShouldBeHere] ''
(Despite these parameter names implying ranged weapons, UseWeapon can be used with melee weapons too.)


=='''Examples'''==
=='''Examples'''==
Line 24: Line 22:


=='''Notes'''==
=='''Notes'''==
* In the parameters of a UseWeapon package, "WeapontoUse" can be set to a reference (a specific weapon), an object (a type of weapon) or a broad class of weapon (e.g. "any ranged weapon").  I am not certain whether or how to specify the equivalent concepts here.  Please replace this if you know the answer.  --[[User:Jwoodward|RadHamster]] 15:30, 29 March 2007 (EDT)




=='''See Also'''==
=='''See Also'''==
* [[Use Weapon Package]]
* [[FireWeapon]]


=='''Reference'''==
Initiate Reddin likely calls this command at least twice when firing her weapon unnecessarily during the trek to GNR.


=='''Reference'''==
None provided.
<!-- [[UseWeapon_Reference|List of functions that use UseWeapon]]  (wiki) -->
<!-- [[UseWeapon_Reference|List of functions that use UseWeapon]]  (wiki) -->


[[Category:Functions]]
[[Category:Functions]]
[[Category:Functions (GECK 1.1)]]
[[Category:AI Functions]]
[[Category:AI Functions]]
[[Category:AI Functions (GECK 1.1)]]
[[Category:Godsend Functions]]
[[Category:Godsend Functions (GECK 1.1)]]

Latest revision as of 02:49, 10 April 2014

Syntax[edit | edit source]

[ActorREF.]UseWeapon WeapontoUse WhereToStand Target NumberOfShots/Hits [CrouchToReload] [HoldFire] [AlwaysHit] [DoNoDamage] [TargetShouldBeHere] 

Description[edit | edit source]

UseWeapon Has an actor use its weapon. It is called on a Reference and takes a whopping nine parameters, though the last five are optional:

  • the weapon
  • where to stand
  • the target
  • how many times to use the weapon
  • whether to crouch when reloading [optional, default is true]
  • whether to hold fire when blocked [optional, default is true]
  • whether to automagically hit the target [for scripted forced kills; optional, default is false]
  • whether to prevent all damage [for scripted protracted fake combat; otpional, default is false]
  • where the target needs to stand [optional, default/NULL means "anywhere"]

Examples[edit | edit source]

BuddyRef.UseWeapon  Pistol12  BuddyRef  HollyRef  5  0 0 0 0 XMarkerRef047

So Buddy would draw his pistol (or grab one if one was nearby), and from his own current location he would fire at HollyRef five times -- but only while she is near XMarkerRef047.

Notes[edit | edit source]

See Also[edit | edit source]

Reference[edit | edit source]

Initiate Reddin likely calls this command at least twice when firing her weapon unnecessarily during the trek to GNR.