openclonk/docs/sdk/definition/properties.xml

168 lines
6.7 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>Properties</title>
<h>Properties</h>
<part>
<text>Every object has a number of properties that are handled by the engine. Typically, these are inherited from the object's Prototype, an <emlink href="definition/index.html#Objektdefinitionen">Object Definition</emlink>. A Property of an Object Definition is defined with the <code>local</code> keyword in the <emlink href="definition/script.html#Objektscripte">Definition's script</emlink>:</text>
<code>local Name = "$Name$";
local ActMap = {
Stand = {
Prototype = Action,
Name = "Stand",
Length = 1,
NextAction = "Stand"
},
};
</code>
<text>
<table>
<caption id="PropertiesTable">Object Properties</caption>
<rowh>
<col>Name</col>
<col>Data type</col>
<col>Description</col>
</rowh>
<row>
<col><code>Prototype</code></col>
<col>proplist</col>
<col></col>
</row>
<row>
<col><code>Name</code></col>
<col>string</col>
<col>Name of the object. This string should be <emlink href="lang.html">internationalized</emlink>.</col>
</row>
<row>
<col><code>Collectible</code></col>
<col>bool</col>
<col>Whether the object can be picked up.</col>
</row>
<row>
<col><code>Touchable</code></col>
<col>int</col>
<col>1 the object can be grabbed, 2 the object can be grabbed and pushed</col>
</row>
<row>
<col><code>ActMap</code></col>
<col>proplist</col>
<col>See the <emlink href="definition/actmap.html">detailed description of the ActMap</emlink></col>
</row>
<row>
<col><code>Visibility</code></col>
<col>int/array</col>
<col>Controls the visibility of the object. See the <emlink href="definition/visibility.html">detailed documentation of possible values</emlink>.</col>
</row>
<row>
<col><code>LineColors</code></col>
<col>array</col>
<col>An array of two integers. The first denotes the color of the line and the second the color of the endpoints if the object is drawn as a line.</col>
</row>
<row>
<col><code>LineAttach</code></col>
<col>array</col>
<col>An array of two integers. Denotes the position of where the endpoint of the line is located relative to the object center.</col>
</row>
<row>
<col><code>PictureTransformation</code></col>
<col>array</col>
<col>If the object is a mesh, the picture graphic of the object can be transformed with this property. See <funclink>Trans_Mul</funclink> for an example.</col>
</row>
<row>
<col><code>MeshTransformation</code></col>
<col>array</col>
<col>If the object is a mesh, the ingame graphic of the object can be transformed with this property. See <funclink>Trans_Mul</funclink> for an example.</col>
</row>
<row>
<col><code>MouseDrag</code></col>
<col>bool</col>
<col>Whether the object can be dragged with the mouse. What exactly happens when an object is dragged onto another is defined in script.</col>
</row>
<row>
<col><code>MouseDragImage</code></col>
<col>id / object</col>
<col>The object or object id of which the picture should be displayed below the cursor while dragging.</col>
</row>
<row>
<col><code>Tooltip</code></col>
<col>string</col>
<col>A tooltip that is displayed for objects of the category <emlink href="definition/category.html">C4D_MouseSelect</emlink>. This string should be <emlink href="lang.html">internationalized</emlink>.</col>
</row>
<row>
<col><code>Action</code></col>
<col>proplist</col>
<col>The current action of the object as a proplist.</col>
</row>
<row>
<col><code>BreatheWater</code></col>
<col>bool</col>
<col>Whether the object breathes in water rather than air.</col>
</row>
<row>
<col><code>CorrosionResist</code></col>
<col>bool</col>
<col>Whether the alive object does not loose energy when in corrosive material.</col>
</row>
<row>
<col><code>MaxEnergy</code></col>
<col>int</col>
<col>Maximum life energy in a precision of 100.</col>
</row>
<row>
<col><code>MaxBreath</code></col>
<col>int</col>
<col>Maximum breath.</col>
</row>
<row>
<col><code>ThrowSpeed</code></col>
<col>int</col>
<col>Throwing speed in a precision of 100.</col>
</row>
<row>
<col><code>JumpSpeed</code></col>
<col>int</col>
<col>Jump speed in a precision of 100.</col>
</row>
<row id="Parallaxity">
<col><code>Parallaxity</code></col>
<col>[int, int]</col>
<col>The Objects's major Z-Position. See <funclink>C4D_Parallax</funclink>.</col>
</row>
<row id="Plane">
<col><code>Plane</code></col>
<col>int</col>
<col>The Object's minor Z-Position. Negative values are behind the landscape, positive values before it. Use 1-399 for stuff behind Clonks, 401-999 for stuff before Clonks, and 1000+ for GUI objects.</col>
</row>
<row>
<literal_col>Placement</literal_col>
<col>Integer</col>
<col>Placement: 0 land surface, 1 in liquid, 2 in mid-air, 3 underground, 4 land surface and underground.</col>
</row>
<row>
<literal_col>BlastIncinerate</literal_col>
<col>Integer</col>
<col>Incineration by explosion: 0 none, otherwise the damage level that has to be reached until the object is incinerated. </col>
</row>
<row>
<literal_col>BurnTo</literal_col>
<col>C4ID</col>
<col>Definition change upon incineration.</col>
</row>
<row>
<literal_col>NoBurnDecay</literal_col>
<col>Integer</col>
<col>0 or 1. If 1, the object does not decompose if burning.</col>
</row>
<row>
<literal_col>ContactIncinerate</literal_col>
<col>Integer</col>
<col>Probability of incineration by contact: 0 none, or 1 (high) to 5 (low).</col>
</row>
</table>
</text>
</part>
<author>Günther</author><date>2011</date>
</doc>