# ActMap

ActMap
The ActMap property describes possible actions (i.e., activities like walking and scaling for clonks; or opening/closing doors of buildings), of an object. It is almost always inherited from their definition. The animation phases of each activity are placed as adjacent images in the Graphics.png (and/or Overlay.png). These animations are being referenced using image coordinates in the ActMap. Animations may be started by script (see SetAction) or directly by the engine. Some activities - especially those of clonks and animals - use an engine-internal procedure, which controls the movement of an object while such an activity is set.

Any number of proplists
Property
Data type
Description
Name
String
Name of the activity. See SetAction().
Procedure
String
Internal procedure. See Procedures.
Speed
Integer
The maximum speed in 1/100 px/frame an internal procedure will move the object with. See Procedures.
Accel
Integer
The acceleration in 1/100 px/frame² an internal procedure will apply to the object. See Procedures.
Decel
Integer
The deceleration in 1/100 px/frame² the internal procedure WALK will apply to the object. See Procedures.
Directions
Integer
Number of animation directions. Animation directions are arranged vertically in Graphics.png.
FlipDir
Integer
If nonzero, this value specifies the first animation phase that is produced by mirroring one of the previous animation directions. If this value is 1, graphics of direction 1 (DIR_Right) will be drawn as a horizontally mirrored graphics of direction 0 (DIR_Left) (see clonks). If it is 7, any directions n >= 7 will be drawn using the mirrored graphics of directions 6 - n, i.e. higher direction values will be drawn using the mirrored graphics in reverse orders (cf. banner in the knights pack).
Length
Integer
Number of animation phases for this activity (arranged horizontally in Graphics.png)
Reverse
Integer
0 or 1. If 1, the animation phases will be shown in reverse order.
Delay
Integer
Time difference in frames (ticks) between two animation phases.
Attach
Integer
Attachment to surfaces: CNAT Value, e.g. value 8 if the object should attach to the floor like a walking clonk does; or 4 for attachment to the ceiling like a hangling clonk. Only evaluated if the procedure is NONE.
X
Integer
Animation graphics: X coordinate from Graphics.png.
Y
Integer
Animation graphics: Y coordinate from Graphics.png.
Wdt
Integer
Width of the animation graphic from Graphics.png.
Hgt
Integer
Height of the animation graphic from Graphics.png.
FacetBase
Integer
0 or 1. If 1, the default facet (i.e., the facet shown if the object has no action) will be drawn behind the action facet.
FacetTopFace
Integer
0 or 1. If 1, the TopFace (see DefCore.txt) will be drawn using the animated facet.
FacetTargetStretch
Boolean
0 or 1. If 1, the graphics will be stretched down towards the upper border of the ActionTarget. Used e.g. for the elevator line.
NextAction
String
Next action being set after the current one has reached its end.
NoOtherAction
Integer
0 or 1. If 1, no other action can be set after this one (used e.g. for death or destruction).
StartCall
String (max. 30 chars)
Object script function which is called when the activity is started.
EndCall
String (max. 30 chars)
Called when an activity reaches the end of its animation.
PhaseCall
String (max. 30 chars)
Called whenever the animation phase changes.
AbortCall
String (max. 30 chars)
Called if an activity is being replaced by another before its regular end; i.e. not by a transition through NextAction. Parameters are the previous animation phase, previous ActionTarget and previous ActionTarget2.
InLiquidAction
String
Action to be set if the object plunges into water.
Sound
String (max. 30 chars)
Permanent sound being played during this action.
ObjectDisabled
Integer
0 or 1. Restricted control of the object during this action.
DigFree
Integer
Area that is dug free during this action. If 1, the area covered by the object shape is freed (like the elevator case); otherwise, the value is taken as the radius of a circular area (like a digging Clonk).
Animation
String
Specifies the animation to be played in the mesh of the object. Works only if the object uses a mesh for its graphics. If given all of Facet, FacetBase, FacetTopFace and FacetTargetStretch are ignored. The Length times Delay possible animation phases are mapped linearly on the animation length. If Delay equals 0 only Length will be used and the animation does not play automatically. See Animationen for further documentation on animations.

Example
The ActMap is defined in the script, an example definition looks like this:
local ActMap = { Fly = { Prototype = Action, Name = "Fly", Procedure = DFA_FLOAT, Directions = 2, FlipDir = 1, Length = 1, Delay = 10, X = 0, Y = 0, Wdt = 24, Hgt = 24, NextAction = "Fly", StartCall = "FlyingStart", }, Flutter = { Prototype = Action, Name = "Flutter", Procedure = DFA_FLOAT, Directions = 2, FlipDir = 1, Length = 11, Delay = 1, X = 0, Y = 0, Wdt = 24, Hgt = 24, NextAction = "Flutter", StartCall = "Fluttering", }, };
Sven2
2002-04
matthes
2004-06
Günther
2011-01