Difference between revisions of "IsWeapon"

Jump to navigation Jump to search
409 bytes removed ,  10:53, 19 August 2006
removing example as it's pointless - the function is self-explanatory
imported>DragoonWraith
(OBSE)
 
imported>DragoonWraith
(removing example as it's pointless - the function is self-explanatory)
Line 5: Line 5:


Returns true if the calling object is classed as a weapon.
Returns true if the calling object is classed as a weapon.
==Example==
set Self to GetSelf
set Weapon to GetInventoryObject N
if ( Weapon.IsWeapon != 0 ) && ( Self.GetEquipped Weapon != 0 )
  ;Weapon is a weapon and is equipped
else ;weapon is not a weapon
  set Weapon to 0
  set N to ( N + 1 )
endif
This script will find the player's equipped weapon (which could have been done far more easily using [[GetEquippedObject]], but that's besides the point).


[[Category: OBSE Functions]]
[[Category: OBSE Functions]]
[[Category: OBSE Item Functions]]
[[Category: OBSE Item Functions]]
[[Category: OBSE Reference Functions]]
[[Category: OBSE Reference Functions]]

Navigation menu