# HG changeset patch # User Wuzzy # Date 1567977053 -3600 # Node ID 71f061ea3941202698e11947bd1019a1dcb82c41 # Parent 210ad26e9e9482522e1bf0c8238103470f7905f5 LuaEvents: Add ammo initialization hints diff -r 210ad26e9e94 -r 71f061ea3941 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. === onAmmoStoreInit() === -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. === onNewAmmoStore(team/clan index, hog index) === 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.