# Procedures

Procedures
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.

Procedure
Description
Behaviour
CNAT
nil
No procedure
Only gravitational effects or attachment as specified in the activity.
Action.Attach
WALK
Walking
According to current ComDir.
CNAT_Bottom
FLIGHT
Free fall
Only gravitational effects
CNAT_None
KNEEL
Getting up
Behaviour according to activity.
CNAT_Bottom
SCALE
Scaling a wall
According to current ComDir.
CNAT_Left/Right
HANGLE
Climbing on the ceiling
According to current ComDir.
CNAT_Top
DIG
Dig
According to current ComDir. With Data=1 material chunks are dug free.
CNAT_None
SWIM
Swimming
According to current ComDir.
CNAT_None
THROW
Throw
Behaviour according to activity.
CNAT_Bottom
BRIDGE
Bridge building
According to ComDir. Bridge material is a material number in Data.
CNAT_Bottom
PUSH
Pushing
Pushes the target object according to ComDir.
CNAT_Bottom
LIFT
Lifting
Lifts the target object according to ComDir.
CNAT_None
FLOAT
Floating in mid-air
According to current ComDir.
CNAT_None
ATTACH
Attachment to another object
Adjusts object position at vertex a to the position of vertex b of the target object. a and b are the two low bytes of ActionData (see SetActionData for an example).
CNAT_None
CONNECT
Line connections
Only line objects. Connects target object 1 and target object 2.
CNAT_None
PULL
Pulling
Pulls the target object according to ComDir.
CNAT_Bottom

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.
Sven2
2002-04