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 > AppendCommand</title>
2010-08-22 13:13:17 +00:00
<category > Objects</category>
2009-05-09 13:11:51 +00:00
<subcat > Commands</subcat>
2018-03-24 22:13:08 +00:00
<version > 1.0 OC</version>
2009-05-09 13:11:51 +00:00
<syntax >
<rtype > bool</rtype>
<params >
<param >
<type > string</type>
2010-03-15 22:55:14 +00:00
<name > command</name>
2010-08-22 13:13:17 +00:00
<desc > Command name (as string). See the table below.</desc>
2009-05-09 13:11:51 +00:00
</param>
<param >
<type > object</type>
2010-03-15 22:55:14 +00:00
<name > target</name>
2009-05-09 13:11:51 +00:00
<optional />
2010-08-22 13:13:17 +00:00
<desc > target object for the command</desc>
2009-05-09 13:11:51 +00:00
</param>
<param >
<type > int</type>
2010-03-15 22:55:14 +00:00
<name > x</name>
2009-05-09 13:11:51 +00:00
<optional />
2010-08-22 13:13:17 +00:00
<desc > X target coordinate</desc>
2009-05-09 13:11:51 +00:00
</param>
<param >
<type > int</type>
2010-03-15 22:55:14 +00:00
<name > y</name>
2009-05-09 13:11:51 +00:00
<optional />
2010-08-22 13:13:17 +00:00
<desc > Y target coordinate</desc>
2009-05-09 13:11:51 +00:00
</param>
<param >
<type > object</type>
2010-03-15 22:55:14 +00:00
<name > target2</name>
2009-05-09 13:11:51 +00:00
<optional />
2010-08-22 13:13:17 +00:00
<desc > secondary target object</desc>
2009-05-09 13:11:51 +00:00
</param>
<param >
<type > int</type>
2010-03-15 22:55:14 +00:00
<name > delay</name>
2009-05-09 13:11:51 +00:00
<optional />
2010-08-22 13:13:17 +00:00
<desc > Time (in ticks or frames) until the command is terminated.</desc>
2009-05-09 13:11:51 +00:00
</param>
<param >
<type > any</type>
<name > Data</name>
<optional />
2010-08-22 13:13:17 +00:00
<desc > additional data for the command</desc>
2009-05-09 13:11:51 +00:00
</param>
<param >
<type > int</type>
2010-03-15 22:55:14 +00:00
<name > retries</name>
2009-05-09 13:11:51 +00:00
<optional />
2010-08-22 13:13:17 +00:00
<desc > Number of retries if the command fails, until the command fails completely.</desc>
2009-05-09 13:11:51 +00:00
</param>
<param >
<type > int</type>
2010-03-15 22:55:14 +00:00
<name > base_mode</name>
2009-05-09 13:11:51 +00:00
<optional />
2010-08-22 13:13:17 +00:00
<desc > Command stack mode. See <funclink > AddCommand</funclink> for values.</desc>
2009-05-09 13:11:51 +00:00
</param>
</params>
</syntax>
2010-08-22 13:13:17 +00:00
<desc > Appends a command to the command stack of an object. The appended command will be executed after the current other commands.<br /> For command descriptions see <funclink > SetCommand</funclink> <br /> Notice: commands set by AppendCommand are not transferred to controlled vehicles (see VehicleControl).</desc>
2009-05-09 13:11:51 +00:00
<examples >
<example >
<code > var base = <funclink > FindBase</funclink> ();
2010-08-22 13:13:17 +00:00
<funclink > SetCommand</funclink> (" MoveTo" , base);
AppendCommand(" Throw" , nil, base-> <funclink > GetX</funclink> (), base-> <funclink > GetY</funclink> ());</code>
<text > Gives the clonk the command to go to the first found base and then throw the first carried object at the base.</text>
2009-05-09 13:11:51 +00:00
</example>
</examples>
<related >
<funclink > SetCommand</funclink>
<funclink > GetCommand</funclink>
<funclink > AddCommand</funclink>
<funclink > FinishCommand</funclink>
</related>
</func>
2010-08-22 13:13:17 +00:00
<author > PeterW</author> <date > 2001-11</date>
2009-05-09 13:11:51 +00:00
</funcs>