GetNifBlockTranslationAlt
From GECK
A function added by the JIP NVSE Plugin.
Contents
Description
Returns the XYZ translation of the specified NIF block in the calling reference's loaded 3D model. The result XYZ are placed into the 3 specified Script Variables.
- The 5th argument, getWorld, is optional. If non-zero, the returned array will contain the XYZ world position of the block.
- The 6th 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 0, and the script variables are unchanged.
Syntax
(success:0/1) reference.GetNifBlockTranslationAlt blockName:string resX:ScriptVar resY:ScriptVar resZ:ScriptVar getWorld:0/1 pcModel:1/2
Or:
(success:0/1) reference.GetNifTransAlt blockName:string resX:ScriptVar resY:ScriptVar resZ:ScriptVar getWorld:0/1 pcModel:1/2
Example
objectRef.GetNifBlockTranslationAlt "Bucket01:0" fPosX fPosY fPosZ
player.GetNifBlockTranslationAlt "##SightingNode" fPosX fPosY fPosZ
player.GetNifBlockTranslationAlt "ProjectileNode" fPosX fPosY fPosZ 1 1