diff -r ed089d5730e5 -r d7c2a5db19a4 LuaAPI.wiki --- a/LuaAPI.wiki Thu Sep 10 01:09:38 2015 +0000 +++ b/LuaAPI.wiki Thu Sep 10 01:24:55 2015 +0000 @@ -267,21 +267,38 @@ === onRightUp() === This function is called when you release the right key. -=== onSetWeapon() === +=== onSetWeapon(msgParam) === It is get called when a weapon is selected or switched. -=== onSlot() === -This function is called when a weapon slot (row in the weapon menu) is selected. +`msgParam` tells you which ammo type was selected. + +=== onSlot(msgParam) === +This function is called when one of the weapon slot keys has been pressed. + +`msgParam` tells the slot number minus 1 (i.e. `0` is for slot number 1, `1` is for slot number 2, etc.). === onSwitch() === This function is called when a hog is switched to another. -=== onTaunt() === +=== onTaunt(msgParam) === This function is called when the player uses an animated emote for example by using the chat commands `/wave`, `/juggle`, etc. -=== onTimer() === +`msgParam` tells you which animation was played: + +|| *`msgParam`* || *Animation* || *Associated chat command* +|| 0 || Rolling up || `/rollup` +|| 1 || Sad face || `/sad` +|| 2 || Waving hand || `/wave` +|| 3 || Stupid winner's grin / “Awesome” face || `/hurrah` +|| 4 || Peeing || `/ilovelotsoflemonade` +|| 5 || Shrug || `/shrug` +|| 6 || Juggling || `/juggle` + +=== onTimer(msgParam) === This function is called when one of the timer keys is pressed. +`msgParams` tells the set timer in seconds (i.e. `3` for the 3 seconds timer key). + === onUpUp() === This function is called when you release the up key.