Difference between revisions of "IsWeapon"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
(OBSE)
 
imported>WereWolf
 
(4 intermediate revisions by 3 users not shown)
Line 2: Line 2:


'''Syntax:'''
'''Syntax:'''
  [''ItemID.'']IsWeapon
  IsWeapon [''ObjectID'']
Returns true if the passed object id is classed as a weapon.
 
[''ref.'']IsWeapon


Returns true if the calling object is classed as a weapon.
Returns true if the calling object is classed as a weapon.


==Example==
<!--[[Category: OBSE Functions]]
 
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 Item Functions]]
[[Category: OBSE Item Functions]]
[[Category: OBSE Reference Functions]]
[[Category: OBSE Reference Functions]]
I was not sure if I must delete this info, so I've just hide it.-->
[[Category: Functions]]
[[Category: Functions (OBSE)]]
[[Category: Inventory Functions]]
[[Category: Inventory Functions (OBSE)]]

Latest revision as of 01:27, 12 September 2007

A command for Oblivion Script Extender

Syntax:

IsWeapon [ObjectID]

Returns true if the passed object id is classed as a weapon.

[ref.]IsWeapon

Returns true if the calling object is classed as a weapon.