LuaAPI.wiki
changeset 1031 637ad254daf9
parent 1030 b8c041a2f98e
child 1032 8ce955537e1c
--- a/LuaAPI.wiki	Thu Sep 21 00:31:16 2017 +0100
+++ b/LuaAPI.wiki	Thu Sep 21 00:53:11 2017 +0100
@@ -391,7 +391,8 @@
 
 === <tt>!SpawnAmmoCrate(x, y, ammoType [, amount])</tt> ===
 Spawns an ammo crate at the specified position with content of ammoType (see [AmmoTypes Ammo Types]). If `ammoType` is set to `amNothing`, a random weapon (out of the available weapons from the weapon scheme) will be selected. If `x` and `y` are set to 0, the crate will spawn on a random position (but always on land). The `amount` parameter specifies the amount of ammo contained in the crate. If `amount` is `nil` or `0`, the value set by `SetAmmo` is used. If `SetAmmo` has not been used for this ammo type, an ammo-type-dependent default value is used. If ´amount` is equal to or greater than `100` or greater, the amount is infinite.
-Because by default settings the number of ammo in crates is zero it has to be increased to at least one with `SetAmmo` first, see the example:
+
+Note that in Lua missions, the default number of ammo in crates is 0, so it has to be set to at least 1 with `SetAmmo` first, see the example:
 
 Example:
 
@@ -933,10 +934,15 @@
 ==== <tt>!SetAmmo(ammoType, count, probability, delay, numberInCrate)</tt> ====
 This updates the settings for a specified [AmmoTypes Ammo Type] as of count available for players, spawn probability, availability delay in turns, and the number available in crates. This is supposed to be used in the `onAmmoStoreInit()` event handler.
 
+In Lua missions, for **all** ammo types, the ammo count, probability, delay and number in crates is set to 0 initially. Note: This also includes skip!
+
 Example:
 
 <code language="lua">    SetAmmo(amShotgun, 9, 0, 0, 0) -- unlimited amount of shotgun ammo for players
-    SetAmmo(amGrenade, 0, 0, 0, 3) -- crates should contain always three grenade</code>
+    SetAmmo(amGrenade, 0, 0, 0, 3) -- crates should contain always three grenade
+    SetAmmo(amSkip, 9, 0, 0, 0) -- enable skip</code>
+
+Hint: It is recommended to always enable skip in missions. Only in exceptional circumstances you should choose to not enable skip.
 
 ==== <tt>!SetAmmoDelay(ammoType, delay)</tt> ====
 Changes the delay of a specified [AmmoTypes Ammo Type].