Difference between revisions of "GetObjectVisualTransform"

From NWN Lexicon
Jump to: navigation, search
(See Also)
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{NWNEE}}Gets a visual transform on the given object.
+
{{DISPLAYTITLE:GetObjectVisualTransform(object, int)}}{{DISPLAYTITLE:GetObjectVisualTransform(object, int)}}__NOTOC__{{NWNEE}}Gets a visual transform on the given object.
  
 
<nwscript>
 
<nwscript>
float GetObjectVisualTransform(object oObject, int nTransform);
+
float GetObjectVisualTransform(
 +
    object oObject,
 +
    int nTransform,
 +
    int bCurrentLerp = FALSE
 +
);
 
</nwscript>
 
</nwscript>
  
===Parameters===
+
====Parameters====
; oObject  
+
;oObject
: The object to visually transform
+
:The object to measure the visual transform from (creature, placeable, item, door)
; nTransform  
+
;nTransform  
: The type of transform to measure (OBJECT_VISUAL_TRANSFORM_*)
+
:An [[OBJECT_VISUAL_TRANSFORM | OBJECT_VISUAL_TRANSFORM_*]] constant specifying the tranform type to measure
 +
;bCurrentLerp
 +
:Do we want the value from the current instance of the interpolated change to the object (TRUE) or do we want the final set value (FALSE) (default: FALSE)
  
===Description===
+
====Description====
Gets a visual transform on the given object.<br>
+
 
Returns the current (or default) value.
+
Gets a visual transform on the given object.
 +
 
 +
Returns the current (or default) value for the given transformation type.
 +
 
 +
 
 +
====Remarks====
 +
 
 +
This can be used to retrieve if an object has had any visual transform at all applied, and reset them if they have changed. The defaults are:
 +
 
 +
* 1.0 for animation speed and object scale
 +
* 0.0 for translate and rotate options
 +
 
 +
As noted in the parameters you can now get either the final visual state of the object (if bCurrentLerp is FALSE) or the current look of it according to the games interpolation (if bCurrentLerp is TRUE). For instance if you're 5 seconds into a 10 second duration lerp, growing to triple size (3.0 if bCurrentLerp was FALSE), you'd be around twice size instead (2.0 if bCurrentLerp was TRUE) and the lerp type was OBJECT_VISUAL_TRANSFORM_LERP_LINEAR.
  
===Remarks===
 
{{stub section}}
 
  
 
===Version===
 
===Version===
[https://steamcommunity.com/games/704450/announcements/detail/1656639211932200914 1.74.8169]
+
 
 +
{{patchnwnee|patch=1.71.8169|link=https://steamcommunity.com/games/704450/announcements/detail/1656639211932200914}}
 +
 
 +
{{patchnwnee|patch=1.83.8193.21|link=https://steamcommunity.com/games/704450/announcements/detail/4622354803159314301|type=updated}} It added the Interpolation checking parameter.
 +
 
  
 
===Example===
 
===Example===
Line 34: Line 54:
 
|}
 
|}
 
----
 
----
[[Category:Functions]]{{DISPLAYTITLE:GetObjectVisualTransform()}}
+
<font color="gray">  author: Shadguy</font>
 +
[[Category:Functions]]
 +
[[Category:Get_Data_from_Object_Functions]]

Revision as of 00:33, 14 March 2021

Nwnee logo.jpg Note: This article documents Neverwinter Nights: Enhanced Edition new content or changes/updates/fixes to 1.69 functions. These are all listed under the category and patches pages.
Gets a visual transform on the given object.
float GetObjectVisualTransform(
    object oObject,
    int nTransform,
    int bCurrentLerp = FALSE
);

Parameters

oObject
The object to measure the visual transform from (creature, placeable, item, door)
nTransform
An OBJECT_VISUAL_TRANSFORM_* constant specifying the tranform type to measure
bCurrentLerp
Do we want the value from the current instance of the interpolated change to the object (TRUE) or do we want the final set value (FALSE) (default: FALSE)

Description

Gets a visual transform on the given object.

Returns the current (or default) value for the given transformation type.


Remarks

This can be used to retrieve if an object has had any visual transform at all applied, and reset them if they have changed. The defaults are:

  • 1.0 for animation speed and object scale
  • 0.0 for translate and rotate options

As noted in the parameters you can now get either the final visual state of the object (if bCurrentLerp is FALSE) or the current look of it according to the games interpolation (if bCurrentLerp is TRUE). For instance if you're 5 seconds into a 10 second duration lerp, growing to triple size (3.0 if bCurrentLerp was FALSE), you'd be around twice size instead (2.0 if bCurrentLerp was TRUE) and the lerp type was OBJECT_VISUAL_TRANSFORM_LERP_LINEAR.


Version

This function was added in 1.71.8169 of NWN:EE.

This function was updated in 1.83.8193.21 of NWN:EE. It added the Interpolation checking parameter.


Example

Information icon.png This article is in need of examples. You can help the NWN Lexicon by showing how to use this code effectively.

See Also

functions: SetObjectVisualTransform()
constants: OBJECT_VISUAL_TRANSFORM_* Constant Group

 author: Shadguy