<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE doc
  SYSTEM '../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../clonk.xsl"?>
<doc>
  <title>Procedures</title>
  <h>Procedures</h>
  <text>For object activity the engine offers various standard procedures which perform typical physical behaviour. In procedure WALK, for instance, the activity automatically changes to "Jump" if the ground under the feet is lost.</text>
  <text>
    <table>
      <rowh>
        <col>Procedure</col>
        <col>Description</col>
        <col>Behaviour</col>
        <col>CNAT</col>
      </rowh>
      <row>
        <col>nil</col>
        <col>No procedure</col>
        <col>Only gravitational effects or attachment as specified in the <emlink href="definition/actmap.html">activity</emlink>.</col>
        <col>Action.Attach</col>
      </row>
      <row id="WALK">
        <col>DFA_WALK</col>
        <col>Walking</col>
        <col>According to current <emlink href="script/fn/SetComDir.html">ComDir</emlink>.</col>
        <col>CNAT_Bottom</col>
      </row>
      <row id="FLIGHT">
        <col>DFA_FLIGHT</col>
        <col>Free fall</col>
        <col>Only gravitational effects</col>
        <col>CNAT_None</col>
      </row>
      <row id="KNEEL">
        <col>DFA_KNEEL</col>
        <col>Getting up</col>
        <col>Behaviour according to <emlink href="definition/actmap.html">activity</emlink>.</col>
        <col>CNAT_Bottom</col>
      </row>
      <row id="SCALE">
        <col>DFA_SCALE</col>
        <col>Scaling a wall</col>
        <col>According to current <emlink href="script/fn/SetComDir.html">ComDir</emlink>.</col>
        <col>CNAT_Left/Right</col>
      </row>
      <row id="HANGLE">
        <col>DFA_HANGLE</col>
        <col>Climbing on the ceiling</col>
        <col>According to current <emlink href="script/fn/SetComDir.html">ComDir</emlink>.</col>
        <col>CNAT_Top</col>
      </row>
      <row id="DIG">
        <col>DFA_DIG</col>
        <col>Dig</col>
        <col>According to current <emlink href="script/fn/SetComDir.html">ComDir</emlink>. With <emlink href="script/fn/SetActionData.html">Data</emlink>=1 material chunks are dug free.</col>
        <col>CNAT_None</col>
      </row>
      <row id="SWIM">
        <col>DFA_SWIM</col>
        <col>Swimming</col>
        <col>According to current <emlink href="script/fn/SetComDir.html">ComDir</emlink>.</col>
        <col>CNAT_None</col>
      </row>
      <row id="THROW">
        <col>DFA_THROW</col>
        <col>Throw</col>
        <col>Behaviour according to <emlink href="definition/actmap.html">activity</emlink>.</col>
        <col>CNAT_Bottom</col>
      </row>
      <row id="BRIDGE">
        <col>DFA_BRIDGE</col>
        <col>Bridge building</col>
        <col>According to <emlink href="script/fn/SetComDir.html">ComDir</emlink>. Bridge material is a material number in <emlink href="script/fn/SetActionData.html">Data</emlink>.</col>
        <col>CNAT_Bottom</col>
      </row>
      <row id="PUSH">
        <col>DFA_PUSH</col>
        <col>Pushing</col>
        <col>Pushes the <emlink href="script/fn/SetAction.html">target object </emlink> according to <emlink href="script/fn/SetComDir.html">ComDir</emlink>.</col>
        <col>CNAT_Bottom</col>
      </row>
      <row id="LIFT">
        <col>DFA_LIFT</col>
        <col>Lifting</col>
        <col>Lifts the <emlink href="script/fn/SetAction.html">target object</emlink> according to <emlink href="script/fn/SetComDir.html">ComDir</emlink>.</col>
        <col>CNAT_None</col>
      </row>
      <row id="FLOAT">
        <col>DFA_FLOAT</col>
        <col>Floating in mid-air</col>
        <col>According to current <emlink href="script/fn/SetComDir.html">ComDir</emlink>.</col>
        <col>CNAT_None</col>
      </row>
      <row id="ATTACH">
        <col>DFA_ATTACH</col>
        <col>Attachment to another object</col>
        <col>Adjusts object position at vertex a to the position of vertex b of the <emlink href="script/fn/SetAction.html">target object</emlink>. a and b are the two low bytes of <emlink href="script/fn/SetActionData.html">ActionData</emlink> (see <emlink href="script/fn/SetActionData.html">SetActionData</emlink> for an example).</col>
        <col>CNAT_None</col>
      </row>
      <row id="CONNECT">
        <col>DFA_CONNECT</col>
        <col>Line connections</col>
        <col>Only <emlink href="definition/lineconnect.html">line objects</emlink>. Connects <emlink href="script/fn/SetAction.html">target object 1</emlink> and <emlink href="script/fn/SetAction.html">target object 2</emlink>.</col>
        <col>CNAT_None</col>
      </row>
      <row id="PULL">
        <col>DFA_PULL</col>
        <col>Pulling</col>
        <col>Pulls the <emlink href="script/fn/SetAction.html">target object</emlink> according to <emlink href="script/fn/SetComDir.html">ComDir</emlink>.</col>
        <col>CNAT_Bottom</col>
      </row>
    </table>
  </text>
  <text>Procedures are hardcoded in the engine and are from older times in which is was not yet possible to implement the same functionality in script. Most procedures represent highly complex behaviour which is useful only for clonks.</text>
  <author>Sven2</author><date>2002-04</date>
</doc>
