Difference between revisions of "IsPlayable"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Odessa
(Correction- only works for armor)
imported>Odessa
(4.5.7 update)
Line 1: Line 1:
{{Function
{{Function
  |origin = NVSE
  |origin = NVSE
  |summary = Returns true (1) if the specified armor or [[calling reference]] has the playable flag. Always returns true if called with a non-armor item. Added by NVSE 4.2.
  |summary = Returns true (1) if the specified form or [[calling reference]], which may be an armor, weapon or ammo, has the playable flag. Added by NVSE 4.2, expanded by NVSE 4.5.
  |name = IsPlayable
  |name = IsPlayable
  |referenceType = reference
  |referenceType = reference
Line 7: Line 7:
  |arguments = {{FunctionArgument
  |arguments = {{FunctionArgument
   |Name = ToCheck
   |Name = ToCheck
   |Type = Armor
   |Type = form
   |Optional = y
   |Optional = y
   }}
   }}
Line 13: Line 13:
==Example==
==Example==
<pre>
<pre>
if IsPlayable SomeArmor
if IsPlayable Weap10mmPistol
     ; The armor is playable
     ; The weapon is playable
endif
endif
</pre>
</pre>


==Note==
* In NVSE 4.2, this function only worked for armor- 4.5.7 has expanded it to work with weapons and ammo as well.
==See Also==
==See Also==
*[[SetIsPlayable]]
*[[SetIsPlayable]]
*[[IsQuestItem]]
*[[IsQuestItem]]
*[[GetWeaponFlags1]] (allows checking the playable flag for weapons)
*[[GetWeaponFlags1]]
[[Category:Functions_(NVSE)]]
[[Category:Functions_(NVSE)]]

Revision as of 11:46, 13 September 2014

< [[::Category:Functions|Category:Functions]]

A function added by the New Vegas Script Extender.

Description

Returns true (1) if the specified form or calling reference, which may be an armor, weapon or ammo, has the playable flag. Added by NVSE 4.2, expanded by NVSE 4.5.

Syntax

[help]
(bool) IsPlayable ToCheck:form

Example

if IsPlayable Weap10mmPistol
    ; The weapon is playable
endif

Note

  • In NVSE 4.2, this function only worked for armor- 4.5.7 has expanded it to work with weapons and ammo as well.

See Also