SetAnimationVariableInt - ObjectReference: Difference between revisions

From the CreationKit Wiki
Jump to navigation Jump to search
imported>MoopusMaximus
No edit summary
m (Convert source tags to syntaxhighlight)
 
(4 intermediate revisions by 4 users not shown)
Line 6: Line 6:


== Syntax ==
== Syntax ==
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
Function SetAnimationVariableInt(string asVariableName, int aiNewValue) native
Function SetAnimationVariableInt(string asVariableName, int aiNewValue) native
</source>
</syntaxhighlight>


== Parameters ==
== Parameters ==
*asVariableName: The name of the variable to read from the graph
*asVariableName: The name of the variable to read from the graph.
*aiNewValue: The new variable value
*aiNewValue: The new variable value.


== Return Value ==
== Return Value ==


== Examples ==
== Examples ==
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
; Force actor to use melee weapon
; Force actor to use melee weapon
SetAnimationVariableInt("iRightHandType", 1)
SetAnimationVariableInt("iRightHandType", 1)
</source>
</syntaxhighlight>


== Notes ==
== Notes ==
*A full list of variables can be found [http://forums.bethsoft.com/topic/1360112-full-dump-of-all-animation-variables/ here.]
*A full list of variables can be found at the [https://ck.uesp.net/wiki/Talk:GetAnimationVariableInt_-_ObjectReference List of Animation Variables].


== See Also ==
== See Also ==

Latest revision as of 20:18, 5 September 2026

Member of: ObjectReference Script

Sets the value of a variable on the reference's animation graph - Int version.

Syntax[edit | edit source]

Function SetAnimationVariableInt(string asVariableName, int aiNewValue) native

Parameters[edit | edit source]

  • asVariableName: The name of the variable to read from the graph.
  • aiNewValue: The new variable value.

Return Value[edit | edit source]

Examples[edit | edit source]

; Force actor to use melee weapon
SetAnimationVariableInt("iRightHandType", 1)

Notes[edit | edit source]

See Also[edit | edit source]