Difference between revisions of "NiObjectNETGetExtraData"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
imported>DragoonWraith
(→‎See Also: NiExtraData functions)
Line 18: Line 18:
   Print (NiObjectGetTypeName nifID *ed)+" (block #"+$(*ed)+") name: %q"+(NiExtraDataGetName nifID *ed)+"%q."
   Print (NiObjectGetTypeName nifID *ed)+" (block #"+$(*ed)+") name: %q"+(NiExtraDataGetName nifID *ed)+"%q."
  loop
  loop
== See Also ==
* [[:Category:NifSE (NiExtraData)|NiExtraData Functions]]


[[Category:NifSE|ObjectNETGetExtraData]]
[[Category:NifSE|ObjectNETGetExtraData]]
[[Category:NifSE (NiObjectNET)|GetExtraData]]
[[Category:NifSE (NiObjectNET)|GetExtraData]]

Revision as of 11:57, 31 August 2010

This is a command from NifSE.

Syntax

(array:extraDataIDs) NiObjectNETGetExtraData short:nifID short:blockID
(array:extraDataIDs) NiObjNETGetED short:nifID short:blockID

Returns the extra data list of the specified NiObjectNET-derived block for an extra data with the given name. Returns -1 if no such extra data exists. As usual, blockID defaults to 0, indicating the root NiNode - which is a NiObjectNET-derived class, so this function works with the default argument. The returned array contains the blockID values for each of the NiExtraData derived blocks in the extra data list.

Example

This script will go through all of a NiObjectNET's extra data, and print their type and name.

short nifID
short objNETid
array_var ed
array_var eds
...
let eds := NiObjectNETGetExtraData nifID objNETid
foreach ed <- eds
  Print (NiObjectGetTypeName nifID *ed)+" (block #"+$(*ed)+") name: %q"+(NiExtraDataGetName nifID *ed)+"%q."
loop

See Also