SetSubGraphFloatVariable - Actor: Difference between revisions

From the CreationKit Wiki
Jump to navigation Jump to search
imported>JLundin
(Created page with "Category:Scripting Category:Papyrus '''Member of:''' Actor Script ''(Requires 1.6)'' Set a variable on all of an actor's sub graphs. == Syntax == <source lang="p...")
 
m (Convert source tags to syntaxhighlight)
 
(6 intermediate revisions by 4 users not shown)
Line 6: Line 6:


== Syntax ==
== Syntax ==
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
Function SetSubGraphFloatVariable(string asVariableName, float afValue) native
Function SetSubGraphFloatVariable(string asVariableName, float afValue) native
</source>
</syntaxhighlight>


== Parameters ==
== Parameters ==
Line 18: Line 18:


== Examples ==
== Examples ==
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
; Set Jake's skin's blend time to 1.0 seconds.
; Set Jake's skin's blend time to 1.0 seconds.
Jake.SetSubGraphFloatVariable("fBlendTime", 1.0)
Jake.SetSubGraphFloatVariable("fBlendTime", 1.0)
</source>
</syntaxhighlight>
 
== Notes ==
* Examination of vanilla meshes and scripts suggests that [[ArmorAddon|ArmorAddon]]s and [[Art Object|Art Object]]s can have behavior graphs, and that these are treated as "sub-graphs" for the actors the meshes are attached to. This script function is used to modify the values of animation variables on these sub-graphs.


== See Also ==
== See Also ==
*[[Actor Script]]
*[[Actor Script]]
*[[PlaySubGraphAnimation - Actor]]

Latest revision as of 20:21, 5 September 2026

Member of: Actor Script (Requires 1.6)

Set a variable on all of an actor's sub graphs.

Syntax[edit | edit source]

Function SetSubGraphFloatVariable(string asVariableName, float afValue) native

Parameters[edit | edit source]

  • asVariableName: The variable name of the variable you'd like to set on all actor's sub graphs.
  • afValue: The value you'd like to set for the above variable.

Return Value[edit | edit source]

None.

Examples[edit | edit source]

; Set Jake's skin's blend time to 1.0 seconds.
Jake.SetSubGraphFloatVariable("fBlendTime", 1.0)

Notes[edit | edit source]

  • Examination of vanilla meshes and scripts suggests that ArmorAddons and Art Objects can have behavior graphs, and that these are treated as "sub-graphs" for the actors the meshes are attached to. This script function is used to modify the values of animation variables on these sub-graphs.

See Also[edit | edit source]