LuaEvents.wiki
changeset 1874 048c71a203c8
parent 1869 b08437e1e087
child 1888 b57907ed3131
equal deleted inserted replaced
1873:0b0c0a66ebf7 1874:048c71a203c8
   129 This function is called when the current player presses 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 the current player releases the attack key.
   132 This function is called when the current player releases the attack key.
   133 
   133 
       
   134 === <tt>onLeftUp()</tt> ===
       
   135 This function is called when the current player releases the left key.
       
   136 
       
   137 === <tt>onRightUp()</tt> ===
       
   138 This function is called when the current player releases the right key.
       
   139 
   134 === <tt>onDownUp()</tt> ===
   140 === <tt>onDownUp()</tt> ===
   135 This function is called when the current player releases the down key.
   141 This function is called when the current player releases the down key.
   136  
   142 
   137 === <tt>onLeftUp()</tt> ===
   143 === <tt>onUpUp()</tt> ===
   138 This function is called when the current player releases the left key.
   144 This function is called when you release the up key. 
   139 
   145 
   140 === <tt>onPreciseUp()</tt> ===
   146 === <tt>onPreciseUp()</tt> ===
   141 This function is called when the current player releases the precise key.
   147 This function is called when the current player releases the precise key.
   142 
   148 
   143 === <tt>onRightUp()</tt> ===
   149 === <tt>onSwitch()</tt> ===
   144 This function is called when the current player releases the right key.
   150 This function is called when the current player presses the switch key.
   145 
   151 
   146 === <tt>onSetWeapon(msgParam)</tt> ===
   152 === <tt>onSetWeapon(msgParam)</tt> ===
   147 It is get called when a weapon is selected or switched.
   153 It is get called when a weapon is selected or switched.
   148 
   154 
   149 `msgParam` tells you which ammo type was selected.
   155 `msgParam` tells you which ammo type was selected.
   150 
   156 
   151 === <tt>onSlot(msgParam)</tt> ===
   157 === <tt>onSlot(msgParam)</tt> ===
   152 This function is called when one of the weapon slot keys has been pressed.
   158 This function is called when one of the weapon slot keys has been pressed.
   153 
   159 
   154 `msgParam` tells the slot number minus 1 (i.e. `0` is for slot number 1, `1` is for slot number 2, etc.).
   160 `msgParam` tells the slot number minus 1 (i.e. `0` is for slot number 1, `1` is for slot number 2, etc.).
   155 
       
   156 === <tt>onSwitch()</tt> ===
       
   157 This function is called when a hog is switched to another.
       
   158 
   161 
   159 === <tt>onTaunt(msgParam)</tt> ===
   162 === <tt>onTaunt(msgParam)</tt> ===
   160 This function is called when the player uses an animated emote for example by using the chat commands `/wave`, `/juggle`, etc.
   163 This function is called when the player uses an animated emote for example by using the chat commands `/wave`, `/juggle`, etc.
   161 
   164 
   162 `msgParam` tells you which animation was played:
   165 `msgParam` tells you which animation was played:
   173 === <tt>onTimer(msgParam)</tt> ===
   176 === <tt>onTimer(msgParam)</tt> ===
   174 This function is called when one of the timer keys is pressed.
   177 This function is called when one of the timer keys is pressed.
   175 
   178 
   176 `msgParams` tells the set timer in seconds (i.e. `3` for the 3 seconds timer key).
   179 `msgParams` tells the set timer in seconds (i.e. `3` for the 3 seconds timer key).
   177 
   180 
   178 === <tt>onUpUp()</tt> ===
       
   179 This function is called when you release the up key.
       
   180 
       
   181 === <tt>onScreenResize()</tt> ===
   181 === <tt>onScreenResize()</tt> ===
   182 This function is called when you resize the screen. Useful place to put a redraw function for any `vgtHealthTags` you're using.
   182 This function is called when you resize the screen. Useful place to put a redraw function for any `vgtHealthTags` you're using.
   183 
   183 
   184 == Gears ==
   184 == Gears ==
   185 === <tt>onGearAdd(gearUid)</tt> ===
   185 === <tt>onGearAdd(gearUid)</tt> ===