2010-08-22 13:13:17 +00:00
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
< !DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
2009-05-09 13:11:51 +00:00
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs >
<func >
<title > CreateConstruction</title>
2010-08-22 13:13:17 +00:00
<category > Objects</category>
<subcat > Creation</subcat>
2011-06-30 10:52:55 +00:00
<version > 5.1 OC</version>
2009-05-09 13:11:51 +00:00
<syntax >
<rtype > object</rtype>
<params >
2010-08-22 13:13:17 +00:00
<param >
<type > id</type>
<name > object_id</name>
<desc > Type of object to be created.</desc>
</param>
<param >
<type > int</type>
<name > xoffset</name>
<desc > X coordinate</desc>
</param>
<param >
<type > int</type>
<name > yoffset</name>
<desc > Y coordinate</desc>
</param>
<param >
<type > int</type>
<name > owner</name>
<desc > Owner of the new object (valid player number or <funclink > NO_OWNER</funclink> for no-owner).</desc>
</param>
<param >
<type > int</type>
<name > completion</name>
<desc > Determines the initial completion of the object in percent (minimum 1).</desc>
</param>
<param >
<type > bool</type>
<name > adjust_terrain</name>
<desc > Determines whether the landscape at the creation site has to be adjusted to the objects basement.</desc>
</param>
<param >
<type > bool</type>
<name > check_site</name>
<desc > First checks the specified site for suitability.</desc>
</param>
2009-05-09 13:11:51 +00:00
</params>
</syntax>
2010-08-22 13:13:17 +00:00
<desc > Should be used instead of <funclink > CreateObject</funclink> to create a building or construction site. In local calls the specified position will be an offset to the position of the calling object. If check_site is 1, the site is checked for suitability before creating the object. If the site is not suitable (e.g. rough ground or not enough space), a message is displayed above the calling object and the function returns 0.</desc>
2009-05-09 13:11:51 +00:00
<examples >
<example >
<code > CreateConstruction( HUT2, 150,100, 0,100,1 );</code>
2010-08-22 13:13:17 +00:00
<text > Creates a compete hut at position 150/100 for player 1 and adjusts the landscape to the building.</text>
2009-05-09 13:11:51 +00:00
</example>
<example >
<code > CreateConstruction( HUT3, 200,100, <funclink > NO_OWNER</funclink> , 30,1 );</code>
2010-08-22 13:13:17 +00:00
<text > Creates a hut construction site at position 200/100 with no owner, also adjusting the landscape.</text>
2009-05-09 13:11:51 +00:00
</example>
</examples>
<related >
<funclink > CreateObject</funclink>
<funclink > CreateContents</funclink>
<funclink > RemoveObject</funclink>
</related>
</func>
2010-08-22 13:13:17 +00:00
<author > springer</author> <date > 2002-04</date>
2009-05-09 13:11:51 +00:00
</funcs>