UseWeapon (Procedure)

From the CreationKit Wiki
Revision as of 02:46, 15 February 2012 by imported>Catwheezle (Added "see also" section.)
Jump to navigation Jump to search

Behavior

Description:
Actor will attack with a weapon -- swinging a sword, shooting a bow, etc.

  • The actor will move to the specified Location.
  • If the actor has a weapon of the specified Weapon type, in will then attack its Target, using the rules specified by the data.

The procedure completes:
If RepeatFire is false, will attack for the specified number of volleys, after which it will be considered to have completed successfully, if true, it will use weapon continously and never complete.

Parameters

  • Location (Location): Specifies where to stand while attacking
  • Weapon (TargetSelector): Specifies a weapon type. In addition to types like "IronSword01," the Package Object dropdrown in the TargetSelector should also allow "Any melee," "Any missile" and possibly even "any weapon."
  • Target (Target): Specifies What to attack
  • AlwaysHit (Bool): If true, shots will be treated as having hit the target, even if they hit something else. (For triggering OnHit script events, or doing damage, etc.)
  • RepeatFire (Bool): Actor will continue to fire as specified in Fire Rate. With this true, procedure has no "completed" state.
  • VolleyFire (Bool): Actor will fire volleys (randomly choosing volley size between Min and Max each time), with the specified pause (randomly choosing between min and max, in seconds). The alternative is simply to fire as rapidly as possible.
  • CrouchReload (Bool): Holdover from Fallout. Makes actors drop to a crouch before they reload their weapon. Probably will be deprecated in TESV.
  • DoNoDamage (Bool): Attacks may hit target, but will not deal any damage.
  • HoldWhenBlocked (Bool): Refrain from attacking if any other actor is either in our line of fire (within fAIAimBlockedToleranceDegrees) or anywhere within a half-circle in front of us (of radius fAIAimBlockedHalfCircleDistance).
  • VolleyWaitMin (Float): Minimum time (in seconds) to wait between volleys (if using Volley fire).
  • VolleyWaitMax (Float): Maximum time (in seconds) to wait between volleys (if using Volley fire).
  • 'VolleysPerBurst (Int): FEATURE IN PROGRESSThis is currently mislabeled -- it should just be "VolleysToFire". If RepeatFire is false, we attack with this many volleys, and then the procedure is considered successfully complete. If RepeatFire is true this value is unused.
  • VolleyShotsMin (Int): Minimum number of shots to fire in one volley.
  • VolleyShotsMax (Int): Maximim number of shots to fire in one volley.
  • AllowCombatStart (Bool): If true, starts normal combat when target is hit (or fired upon?).
  • AimWithoutFiring (Bool): If true, aim but do not fire (thus ignoring many of the other parameters' values)
  • AlwaysPowerAttack (Bool): If true, only use power attacks.
  • DoHeadTracking (Bool): ???
  • BlockPercent (Float): ??? (assuming this mimics the blocking Combat Style setting?)

 

Notes

  • Does this procedure have a defined ending?
    • Yes, but only if RepeatFire is false. The procedure will attack for the specified number of volleys, after which it will be considered to have completed successfully.
  • How does this procedure deal with multiple targets?
    • If an ObjectList is passed into the Target parameter, only the first target in an ObjectList is considered.

See Also