File: PlayerControl.xml

package info (click to toggle)
openclonk 8.1-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 169,520 kB
  • sloc: cpp: 180,479; ansic: 108,988; xml: 31,371; python: 1,223; php: 767; makefile: 145; sh: 101; javascript: 34
file content (80 lines) | stat: -rw-r--r-- 2,826 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
  SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
  <func>
    <title>PlayerControl</title>
    <category>Callbacks</category>
    <version>5.1 OC</version>
    <syntax>
      <rtype>bool</rtype>
      <params>
        <param>
          <type>int</type>
          <name>player</name>
          <desc>Number of the player who pressed the control.</desc>
        </param>
        <param>
          <type>int</type>
          <name>control</name>
          <desc>Number of the pressed control, defined as a CON_ constant via PlayerControls.txt.</desc>
        </param>
        <param>
          <type>id</type>
          <name>control_extra</name>
          <desc>Optional id defined with ExtraData in PlayerControls.txt.</desc>
        </param>
        <param>
          <type>int</type>
          <name>x</name>
          <desc>X coordinate for mouse controls.</desc>
        </param>
        <param>
          <type>int</type>
          <name>y</name>
          <desc>Y coordinate for mouse controls.</desc>
        </param>
        <param>
          <type>int</type>
          <name>strength</name>
          <desc>Current strength of the control. For key presses: 0 or 100. For analog stick or trigger movement (state = CONS_Moved): 0 to <code>PLRCON_MaxStrength</code>.</desc>
        </param>
        <param>
          <type>bool</type>
          <name>repeated</name>
          <desc>Whether the call is generated because of a held button.</desc>
        </param>
        <param>
          <type>int</type>
          <name>state</name>
          <desc>
            State of the key press. Possible values:
            <table>
              <rowh>
                <col>Constant</col>
                <col>Description</col>
              </rowh>
              <row>
                <literal_col>CONS_Down</literal_col>
                <col>Key has been pressed down.</col>
              </row>
              <row>
                <literal_col>CONS_Up</literal_col>
                <col>Key has been released. Only generated for held keys.</col>
              </row>
              <row>
                <literal_col>CONS_Moved</literal_col>
                <col>An analog control on a gamepad has been moved. Only generated for held keys.</col>
              </row>
            </table>
          </desc>
        </param>
	</params>
    </syntax>
    <desc>Called globally for each control command by players. See <emlink href="script/playercontrols.html">Player Controls</emlink>.</desc>
    <related><funclink>GetPlayerControlState</funclink></related>
    <related><emlink href="playercontrols.html">Player Controls</emlink></related>
  </func>
  <author>Luchs</author><date>2016-02</date>
</funcs>