GetNifBlockTranslation

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Returns a 3-element array_var containing the XYZ translation of the specified NIF block in the calling reference's loaded 3D model.

  • The 2nd argument, getWorld, is optional. If non-zero, the returned array will contain the XYZ world position of the block.
  • The 3rd argument, pcModel, is optional, and may be used when calling the function on the player. The player character has two, completely separate 3D models for 1st and 3rd person. This argument enables to explicitly target one of the models.
1	3rd Person Model
2	1st Person Model
  • If the 3D model does not have the specified block, the function returns ar_Null.

Syntax

[help]
(translation:array_var) reference.GetNifBlockTranslation blockName:string getWorld:0/1 pcModel:1/2 

Or:

(translation:array_var) reference.GetNifTrans blockName:string getWorld:0/1 pcModel:1/2

Example

let aTranslation := objectRef.GetNifBlockTranslation "Bucket01:0"
let aTranslation := player.GetNifBlockTranslation "##SightingNode"
let aTranslation := player.GetNifBlockTranslation "ProjectileNode" 1 1 

See Also