GetEquippedWeapon - Actor

Revision as of 07:46, 6 September 2012 by imported>Chesko (Cleaned up grammar in Parameters section.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Member of: Actor Script

Gets the actor's currently equipped weapon.

SyntaxEdit

Weapon Function GetEquippedWeapon(bool abLeftHand = false) native

ParametersEdit

  • abLeftHand: If true, will return the weapon equipped in the actor's left hand. If false, will return the right-hand weapon instead.
    • Default: False

Return ValueEdit

The Weapon the actor currently has equipped.

ExamplesEdit

; Does the player have the uber dagger equipped in their right hand?
if (Game.GetPlayer().GetEquippedWeapon() == UberDagger)
  Debug.Trace("Player has uber-dagger equipped in their right hand")
endIf


; Does the player have the wimpy sword equipped in their left hand?
if (Game.GetPlayer().GetEquippedWeapon(true) == WimpyDagger)
  Debug.Trace("Player has wimpy sword in their left hand")
endIf

See AlsoEdit