Difference between revisions of "IsPlayable"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Odessa
(Created page with "{{Function |origin = NVSE |summary = Returns true if the specified object has the playable flag. Always returns false if the item can not be flagged as playable in the edito...")
 
imported>Pintocat
m
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Function
{{Function
  |origin = NVSE
  |origin = NVSE
  |summary = Returns true if the specified object has the playable flag. Always returns false if the item can not be flagged as playable in the editor.
  |summary = Returns true (1) if the specified form or [[calling reference]], which may be an armor, weapon, ammo or race, has the playable flag. Added by NVSE 4.2 (see notes).
  |name = IsPlayable
  |name = IsPlayable
|referenceType = reference
  |returnType = bool
  |returnType = bool
  |arguments = {{FunctionArgument
  |arguments = {{FunctionArgument
   |Name = Item
   |Name = ToCheck
   |Type = Object
   |Type = form
  |Optional = y
   }}
   }}
  |referenceType = }}
  |referenceType = }}
==Example==
==Example==
<pre>
<pre>
if IsPlayable SomeItem
if IsPlayable Weap10mmPistol
     ; The item is playable
     ; The weapon is playable
endif
endif
</pre>
</pre>
 
==Form Types==
These form types can be Playable:
<pre>10: Hair (not supported by this function; see LNIsPlayable)
11: Eyes (not supported by this function; see LNIsPlayable)
12: Race
24: Armor
40: Weapon
41: Ammo
86: Perk (not supported by this function; see LNIsPlayable)</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.
* Since NVSE 5.0.2, this function also supports races.
==See Also==
==See Also==
*[[SetIsPlayable]]
*[[IsQuestItem]]
*[[IsQuestItem]]
*[[GetWeaponFlags1]]
[[Category:Functions_(NVSE)]]
[[Category:Functions_(NVSE)]]

Latest revision as of 10:49, 26 January 2017

< [[::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, ammo or race, has the playable flag. Added by NVSE 4.2 (see notes).

Syntax

[help]
(bool) IsPlayable ToCheck:form

Example

if IsPlayable Weap10mmPistol
    ; The weapon is playable
endif

Form Types

These form types can be Playable:

10: Hair (not supported by this function; see LNIsPlayable)
11: Eyes (not supported by this function; see LNIsPlayable)
12: Race
24: Armor
40: Weapon
41: Ammo
86: Perk (not supported by this function; see LNIsPlayable)

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.
  • Since NVSE 5.0.2, this function also supports races.

See Also