PageRenderTime 21ms CodeModel.GetById 14ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/docs/sdk/script/fn/GetCommand.xml

https://bitbucket.org/randrian/openclonk2
XML | 52 lines | 50 code | 2 blank | 0 comment | 0 complexity | 937e34136e8af1a8a2e94ea336c1710f MD5 | raw file
Possible License(s): WTFPL, 0BSD, LGPL-2.1, CC-BY-3.0
 1<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
 2<!DOCTYPE funcs SYSTEM "../../../clonk.dtd">
 3<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
 4<funcs>
 5  <func>
 6    <title>GetCommand</title>
 7    <category>Objekte</category>
 8    <subcat>Commands</subcat>
 9    <version>4.6.5.0 CP
10      <extversion>4.9.1.0 GWE</extversion>
11      <extversion>4.9.5.0 CE</extversion>
12    </version>
13    <syntax>
14      <rtype>any</rtype>
15      <params>
16        <param>
17          <type>int</type>
18          <name>iElement</name>
19          <optional />
20          <desc>Information, die zur�ckgegeben werden soll. 0 oder kA: Name, 1: Target, 2: TargetX, 3: TargetY, 4: Target2, 5: Data</desc>
21        </param>
22        <param>
23          <type>int</type>
24          <name>iCommandNum</name>
25          <optional />
26          <desc>Nummer des Kommandos. 0 steht f�r das momentan aktive, 1 f�r das danach auszuf�hrende usw.</desc>
27        </param>
28      </params>
29    </syntax>
30
31    <desc>Gibt Informationen �ber ein Kommando des aufrufenden Objekts zur�ck. F�hrt das Objekt momentan keine Aktion aus, so wird (bei jedem Wert von iElement) 0 zur�ckgegeben.</desc>
32
33    <examples>
34      <example>
35        <code>func Timer()
36{
37  if(GetCommand() == "Enter" &amp;&amp; GetCommand(1) == <funclink>FindBase</funclink>(<funclink>GetOwner</funclink>()))
38    <funclink>Enter</funclink>(<funclink>FindBase</funclink>(<funclink>GetOwner</funclink>()));
39}</code>
40        <text>
41Dieser Script beamt das Objekt, falls sein Kommando ist, in seine Basis zu gehen (Kommando "Enter"), sofort dorthin. Dies w�rde z.B. dazu f�hren, dass man mit der Maussteuerung den Clonk direkt in seine Heimatbasis beamen k�nnte, indem man den Eingang anklickt.
42        </text>
43      </example>
44    </examples>
45    <related>
46      <funclink>SetCommand</funclink>
47      <funclink>AddCommand</funclink>
48      <funclink>AppendCommand</funclink>
49    </related>
50  </func>
51  <author>PeterW</author><date>November 2001</date>
52</funcs>