1<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2<!DOCTYPE funcs
3  SYSTEM '../../../clonk.dtd'>
4<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
5<funcs>
6  <func>
7    <title>Anim_YDir</title>
8    <category>Animations</category>
9    <version>5.1 OC</version>
10    <syntax>
11      <rtype>array</rtype>
12      <params>
13        <param>
14          <type>int</type>
15          <name>begin</name>
16          <desc>Start of the interval.</desc>
17        </param>
18        <param>
19          <type>int</type>
20          <name>end</name>
21          <desc>End of the interval. If end is greater than begin then the value increases with increases XDir, otherwise it decreases.</desc>
22        </param>
23        <param>
24          <type>int</type>
25          <name>max_dir</name>
26          <desc>Highest value of the YDir to be mapped. All larger velocities lead to the same animation value (end).</desc>
27        </param>
28      </params>
29    </syntax>
30    <desc>The value is proportional to the object's velocity in Y direction. The velocities 0 to max_dir are mapped linearly to the interval given by begin and end.</desc>
31    <remark>See the <emlink href="definition/animations.html">animation documentation</emlink> for further explanations of the animation system.</remark>
32    <examples>
33      <example>
34        <code><funclink>PlayAnimation</funclink>(&quot;ShowSpeed&quot;, 10, <funclink>Anim_YDir</funclink>(0, <funclink>GetAnimationLength</funclink>(&quot;ShowSpeed&quot;), 100), <funclink>Anim_Const</funclink>(1000));</code>
35        <text>Plays the animation "ShowSpeed" in slot 10. This could be a velocity display in an elevator.</text>
36      </example>
37    </examples>
38    <related>
39      <funclink>PlayAnimation</funclink>
40      <funclink>SetAnimationPosition</funclink>
41      <funclink>SetAnimationWeight</funclink>
42      <funclink>Anim_Const</funclink>
43      <funclink>Anim_Linear</funclink>
44      <funclink>Anim_X</funclink>
45      <funclink>Anim_Y</funclink>
46      <funclink>Anim_R</funclink>
47      <funclink>Anim_AbsX</funclink>
48      <funclink>Anim_AbsY</funclink>
49      <funclink>Anim_Dist</funclink>
50      <funclink>Anim_XDir</funclink>
51      <funclink>Anim_Action</funclink>
52    </related>
53  </func>
54  <author>Clonk-Karl</author><date>2010-01</date>
55</funcs>
56