diff -r 7b07726d12f3 -r 12e1aa6294d7 LuaEvents.wiki --- a/LuaEvents.wiki Wed Apr 17 14:44:41 2019 +0100 +++ b/LuaEvents.wiki Wed Apr 17 14:49:53 2019 +0100 @@ -86,6 +86,11 @@ === onAchievementsDeclaration() === This function is called after the stats for the stats screen (after the game) have been generated. You are supposed to call `DeclareAchievement` here. +=== onHogAttack(ammoType) === +This function is called when a hedgehog attacks. Beginning with 0.9.21, the parameter `ammoType` is provided. It contains the ammo type of the weapon used for the attack. + +Note: If you want to detect when a turn was skipped, use `onSkipTurn()`. There is no guarantee that `onHogAttack(amSkip)` is called in such an event. + === onUsedAmmo(ammoType) === Called after a weapon has been used completely, with `ammoType` as the used ammo type. @@ -95,7 +100,7 @@ == Controls == === onAttack() === -This function is called when your Hedgehog attacks. +This function is called when you press the attack key. === onHJump() === This function is called when you press the high jump key. @@ -124,11 +129,6 @@ === onDownUp() === This function is called when you release the down key. -=== onHogAttack(ammoType) === -This function is called when you press the attack key. Beginning with 0.9.21, the parameter `ammoType` is provided. It contains the ammo type of the weapon used for the attack. - -Note: If you want to detect when a turn was skipped, use `onSkipTurn()`. There is no guarantee that `onHogAttack(amSkip)` is called in such an event. - === onLeftUp() === This function is called when you release the left key.