<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
  SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
  <func>
    <title>Anim_XDir</title>
    <category>Animations</category>
    <version>5.1 OC</version>
    <syntax>
      <rtype>array</rtype>
      <params>
        <param>
          <type>int</type>
          <name>begin</name>
          <desc>Start of the interval.</desc>
        </param>
        <param>
          <type>int</type>
          <name>end</name>
          <desc>End of the interval. If end is greater than begin then the value increases with increases XDir, otherwise it decreases.</desc>
        </param>
        <param>
          <type>int</type>
          <name>max_dir</name>
          <desc>Largest value of XDir to be mapped. Even larger velocities lead to the same animation value (end).</desc>
        </param>
      </params>
    </syntax>
    <desc>The value is proportional to the object's velocity in X direction. The velocities from 0 to max_dir are mapped linearily to the interval from begin to end.</desc>
    <remark>See the <emlink href="definition/animations.html">animation documentation</emlink> for further explanations of the animation system.</remark>
    <examples>
      <example>
        <code><funclink>PlayAnimation</funclink>(&quot;ShowSpeed&quot;, 10, <funclink>Anim_XDir</funclink>(0, <funclink>GetAnimationLength</funclink>(&quot;ShowSpeed&quot;), 100), <funclink>Anim_Const</funclink>(1000));</code>
        <text>Plays the animation "ShowSpeed" in slot 10. This could be a tachoometer in a vehicle.</text>
      </example>
    </examples>
    <related>
      <funclink>PlayAnimation</funclink>
      <funclink>SetAnimationPosition</funclink>
      <funclink>SetAnimationWeight</funclink>
      <funclink>Anim_Const</funclink>
      <funclink>Anim_Linear</funclink>
      <funclink>Anim_X</funclink>
      <funclink>Anim_Y</funclink>
      <funclink>Anim_AbsX</funclink>
      <funclink>Anim_AbsY</funclink>
      <funclink>Anim_YDir</funclink>
      <funclink>Anim_Action</funclink>
    </related>
  </func>
  <author>Clonk-Karl</author><date>2010-01</date>
</funcs>
