Difference between revisions of "GetEquippedWeapon - Actor"
Jump to navigation
Jump to search
imported>JustinOther m (Added notes/tidbit about the need for the weapon to be drawn.) |
imported>JustinOther m (→Notes: Left hand only.) |
||
Line 32: | Line 32: | ||
</source> | </source> | ||
== Notes == | == Notes == | ||
* This will only return the weapon form equipped if it is drawn | * This will only return the weapon form equipped in the left hand if it is drawn. 'None' is returned if no weapon is drawn by the left hand. | ||
== See Also == | == See Also == | ||
*[[Actor Script]] | *[[Actor Script]] | ||
*[[EquipItem - Actor]] | *[[EquipItem - Actor]] | ||
*[[GetEquippedShield - Actor]] | *[[GetEquippedShield - Actor]] |
Revision as of 23:46, 21 April 2012
Member of: Actor Script
Gets the actor's currently equipped weapon.
Syntax
Weapon Function GetEquippedWeapon(bool abLeftHand = false) native
Parameters
- abLeftHand: The get the weapon from the left hand.
- Default: false - The default will use the actors right hand.
Return Value
The Weapon the actor currently has equipped.
Examples
; 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
Notes
- This will only return the weapon form equipped in the left hand if it is drawn. 'None' is returned if no weapon is drawn by the left hand.