LuaEvents.wiki
changeset 1973 05be23a15de9
parent 1972 71f061ea3941
child 2077 514babfbad9e
equal deleted inserted replaced
1972:71f061ea3941 1973:05be23a15de9
    40 === <tt>onAmmoStoreInit()</tt> ===
    40 === <tt>onAmmoStoreInit()</tt> ===
    41 This function is called when the game is initialized to request the available ammo, ammo probabilities and other ammo settings. Use `SetAmmo` here.
    41 This function is called when the game is initialized to request the available ammo, ammo probabilities and other ammo settings. Use `SetAmmo` here.
    42 
    42 
    43 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:
    43 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:
    44 
    44 
    45 * Initial ammo: 0
    45  * Initial ammo: 0
    46 * Crate probability: 0
    46  * Crate probability: 0
    47 * Number in crate: 0
    47  * Number in crate: 0
    48 * Delay: 0
    48  * Delay: 0
    49 
    49 
    50 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.
    50 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.
    51 
    51 
    52 === <tt>onNewAmmoStore(team/clan index, hog index)</tt> ===
    52 === <tt>onNewAmmoStore(team/clan index, hog index)</tt> ===
    53 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.
    53 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.