LuaEvents: Add ammo initialization hints draft
authorWuzzy
Sun, 08 Sep 2019 22:10:53 +0100
changeset 1972 71f061ea3941
parent 1971 210ad26e9e94
child 1973 05be23a15de9
LuaEvents: Add ammo initialization hints
LuaEvents.wiki
--- a/LuaEvents.wiki	Sun Sep 08 21:59:37 2019 +0100
+++ b/LuaEvents.wiki	Sun Sep 08 22:10:53 2019 +0100
@@ -38,7 +38,16 @@
 *Tip*: If you use this callback, make sure to document the interpretation of the parameters so others know how to set the parameters properly.
 
 === <tt>onAmmoStoreInit()</tt> ===
-This function is called when the game is initialized to request the available ammo and ammo probabilities. Use `SetAmmo` here.
+This function is called when the game is initialized to request the available ammo, ammo probabilities and other ammo settings. Use `SetAmmo` here.
+
+If you add this event handler, then the weapon scheme (in a multiplayer game) will be ignored, and the settings of all ammos be initialized to the following values:
+
+* Initial ammo: 0
+* Crate probability: 0
+* Number in crate: 0
+* Delay: 0
+
+If this event handler is *not* present, then the game will use the weapon scheme that the player selected (in multiplayer games). In missions, all ammos are always initialized at 0 by default, even without this event handler.
 
 === <tt>onNewAmmoStore(team/clan index, hog index)</tt> ===
 This function is identical to `onAmmoStoreInit` in function, but is called once per ammo store.  This allows different ammo sets for each clan, team or hedgehog depending on the mode.