Site Tools


tutorial:adding-havok-variables

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
tutorial:adding-havok-variables [2025/02/26 04:12] admintutorial:adding-havok-variables [2025/02/27 00:49] (current) admin
Line 50: Line 50:
 Each variable info entry is represented by the following (or a variant of): Each variable info entry is represented by the following (or a variant of):
  
-<code>+<code XML>
 <hkobject> <hkobject>
     <hkparam name="role">     <hkparam name="role">
Line 65: Line 65:
  
 The function of the typing attribute (type) is to define the data type of the variable. The following data types are used: The function of the typing attribute (type) is to define the data type of the variable. The following data types are used:
-<code>+<code XML>
 VARIABLE_TYPE_REAL VARIABLE_TYPE_REAL
 VARIABLE_TYPE_INT8 VARIABLE_TYPE_INT8
Line 81: Line 81:
 Each variable bounds entry is represented by the following (or a variant of): Each variable bounds entry is represented by the following (or a variant of):
  
-<code>+<code XML>
 <hkobject> <hkobject>
     <hkparam name="min">     <hkparam name="min">
Line 101: Line 101:
 Each word variable value entry is represented by the following (or a variant of): Each word variable value entry is represented by the following (or a variant of):
  
-<code>+<code XML>
 <hkobject> <hkobject>
     <hkparam name="value">0</hkparam>     <hkparam name="value">0</hkparam>
Line 112: Line 112:
 Each variable name entry is represented by the following (or a variant of): Each variable name entry is represented by the following (or a variant of):
  
-<code>+<code XML>
 <hkcstring>WeaponAnimSpeed</hkcstring> <hkcstring>WeaponAnimSpeed</hkcstring>
 </code> </code>
Line 123: Line 123:
 A variable binding set entry should look similar to the following, substituting the #ID, #MEMBERNAME and #VARINDEX text with the appropriate values. A variable binding set entry should look similar to the following, substituting the #ID, #MEMBERNAME and #VARINDEX text with the appropriate values.
  
-<code>+<code XML>
 <hkobject class="hkbVariableBindingSet" name="#ID" signature="0xe942f339"> <hkobject class="hkbVariableBindingSet" name="#ID" signature="0xe942f339">
     <hkparam name="bindings" numelements="1">     <hkparam name="bindings" numelements="1">
Line 153: Line 153:
  
 Added hkbVariableBindingSet: Added hkbVariableBindingSet:
-<code>+<code XML>
 <hkobject class="hkbVariableBindingSet" name="#14995" signature="0xe942f339"> <hkobject class="hkbVariableBindingSet" name="#14995" signature="0xe942f339">
     <hkparam name="bindings" numelements="1">     <hkparam name="bindings" numelements="1">
Line 169: Line 169:
 Usage in hkbClipGenerator: Usage in hkbClipGenerator:
  
-<code>+<code XML>
 <hkobject class="hkbClipGenerator" name="#530" signature="0xd4cc9f6"> <hkobject class="hkbClipGenerator" name="#530" signature="0xd4cc9f6">
     <hkparam name="variableBindingSet">#14995</hkparam>     <hkparam name="variableBindingSet">#14995</hkparam>
Line 201: Line 201:
 For exaple, you can now add the following code to set the animation speed of all hkbClipGenerators that make use of the hkbVariableBindingSet that targets playbackSpeed and uses the WeaponAnimSpeed variable. For exaple, you can now add the following code to set the animation speed of all hkbClipGenerators that make use of the hkbVariableBindingSet that targets playbackSpeed and uses the WeaponAnimSpeed variable.
  
-<code>+<code Lua>
 SetVariable("WeaponAnimSpeed", 0.5) SetVariable("WeaponAnimSpeed", 0.5)
 </code> </code>
Line 209: Line 209:
 You can then combine this with conditions to create new in-game effects, here for example a ring could provide +10% weapon swing speed: You can then combine this with conditions to create new in-game effects, here for example a ring could provide +10% weapon swing speed:
  
-<code>+<code Lua>
 --- 111121 is the SpEffect given by the ring --- 111121 is the SpEffect given by the ring
 if env(GetSpEffectID, 111121) == TRUE then if env(GetSpEffectID, 111121) == TRUE then
tutorial/adding-havok-variables.1740543158.txt.gz · Last modified: by admin