openclonk/docs/sdk/definition/procedures.xml

118 lines
5.1 KiB
XML

<?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>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>FLIGHT</col>
<col>Free fall</col>
<col>Only gravitational effects</col>
<col>CNAT_None</col>
</row>
<row id="KNEEL">
<col>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>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>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>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>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>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>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>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>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>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>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>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>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>