LuaAPI: Add hint for onHogAttack to use onSkipTurn to detect a skip turn
authorWuzzy
Thu, 20 Sep 2018 13:51:32 +0100
changeset 1572 ed20d7c7c667
parent 1571 94d8cb743e9a
child 1573 abc3dab20140
LuaAPI: Add hint for onHogAttack to use onSkipTurn to detect a skip turn
LuaAPI.wiki
--- a/LuaAPI.wiki	Sat Sep 15 18:45:39 2018 +0100
+++ b/LuaAPI.wiki	Thu Sep 20 13:51:32 2018 +0100
@@ -312,7 +312,9 @@
 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.
+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.