LuaEvents.wiki
changeset 1868 02c1ba88f908
parent 1867 984a0cf6b491
child 1869 b08437e1e087
equal deleted inserted replaced
1867:984a0cf6b491 1868:02c1ba88f908
   100 
   100 
   101 *Warning:* In 0.9.24 or earlier, you must not manipulate any ammo within this callback, e.g. by using `AddAmmo`. The ammo storage might become garbled otherwise.
   101 *Warning:* In 0.9.24 or earlier, you must not manipulate any ammo within this callback, e.g. by using `AddAmmo`. The ammo storage might become garbled otherwise.
   102 
   102 
   103 == Controls ==
   103 == Controls ==
   104 === <tt>onAttack()</tt> ===
   104 === <tt>onAttack()</tt> ===
   105 This function is called when you press the attack key.
   105 This function is called when the current player presses the attack key.
   106 
   106 
   107 === <tt>onHJump()</tt> ===
   107 === <tt>onHJump()</tt> ===
   108 This function is called when you press the high jump key.
   108 This function is called when the current player presses the high jump key.
   109 
   109 
   110 === <tt>onLJump()</tt> ===
   110 === <tt>onLJump()</tt> ===
   111 This function is called when you press the long jump key.
   111 This function is called when the current player presses press the long jump key.
   112 
   112 
   113 === <tt>onPrecise()</tt> ===
   113 === <tt>onPrecise()</tt> ===
   114 This function is called when you press the precise key.
   114 This function is called when the current player presses the precise key.
   115 
   115 
   116 === <tt>onPreciseLocal()</tt> (1.0.0) ===
   116 === <tt>onPreciseLocal()</tt> (1.0.0) ===
   117 This function is called when the player on the local client presses the precise key, no matter which hedgehog is active at the moment.
   117 This function is called when the player on the local client presses the precise key, no matter which team is active at the moment.
   118 
   118 
   119 === <tt>onLeft()</tt> ===
   119 === <tt>onLeft()</tt> ===
   120 This function is called when you press the left key.
   120 This function is called when the current player presses the left key.
   121 
   121 
   122 === <tt>onRight()</tt> ===
   122 === <tt>onRight()</tt> ===
   123 This function is called when you press the right key.
   123 This function is called when the current player presses the right key.
   124 
   124 
   125 === <tt>onUp()</tt> ===
   125 === <tt>onUp()</tt> ===
   126 This function is called when you press the up key.
   126 This function is called when the current player presses the up key.
   127 
   127 
   128 === <tt>onDown()</tt> ===
   128 === <tt>onDown()</tt> ===
   129 This function is called when you press the down key.
   129 This function is called when the current player presses the down key.
   130 
   130 
   131 === <tt>onAttackUp()</tt> ===
   131 === <tt>onAttackUp()</tt> ===
   132 This function is called when you release the attack key.
   132 This function is called when the current player releases the attack key.
   133 
   133 
   134 === <tt>onDownUp()</tt> ===
   134 === <tt>onDownUp()</tt> ===
   135 This function is called when you release the down key.
   135 This function is called when the current player releases the down key.
   136  
   136  
   137 === <tt>onLeftUp()</tt> ===
   137 === <tt>onLeftUp()</tt> ===
   138 This function is called when you release the left key.
   138 This function is called when the current player releases the left key.
   139 
   139 
   140 === <tt>onPreciseUp()</tt> ===
   140 === <tt>onPreciseUp()</tt> ===
   141 This function is called when you release the precise key.
   141 This function is called when the current player releases the precise key.
   142 
   142 
   143 === <tt>onRightUp()</tt> ===
   143 === <tt>onRightUp()</tt> ===
   144 This function is called when you release the right key.
   144 This function is called when the current player releases the right key.
   145 
   145 
   146 === <tt>onSetWeapon(msgParam)</tt> ===
   146 === <tt>onSetWeapon(msgParam)</tt> ===
   147 It is get called when a weapon is selected or switched.
   147 It is get called when a weapon is selected or switched.
   148 
   148 
   149 `msgParam` tells you which ammo type was selected.
   149 `msgParam` tells you which ammo type was selected.