LuaEvents: Fix onAttack, onHogAttack
authorWuzzy
Wed, 17 Apr 2019 14:49:53 +0100
changeset 1795 12e1aa6294d7
parent 1794 7b07726d12f3
child 1796 8b10d405a1a0
LuaEvents: Fix onAttack, onHogAttack
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 @@
 === <tt>onAchievementsDeclaration()</tt> ===
 This function is called after the stats for the stats screen (after the game) have been generated. You are supposed to call `DeclareAchievement` here.
 
+=== <tt>onHogAttack(ammoType)</tt> ===
+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.
+
 === <tt>onUsedAmmo(ammoType)</tt> ===
 Called after a weapon has been used completely, with `ammoType` as the used ammo type.
 
@@ -95,7 +100,7 @@
 
 == Controls ==
 === <tt>onAttack()</tt> ===
-This function is called when your Hedgehog attacks.
+This function is called when you press the attack key.
 
 === <tt>onHJump()</tt> ===
 This function is called when you press the high jump key.
@@ -124,11 +129,6 @@
 === <tt>onDownUp()</tt> ===
 This function is called when you release the down key.
  
-=== <tt>onHogAttack(ammoType)</tt> ===
-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.
-
 === <tt>onLeftUp()</tt> ===
 This function is called when you release the left key.