Better documentation about the special coordinates x=0, y=0 for the crate spawn functions.
authoralmikes@aol.com
Wed, 03 Dec 2014 05:58:47 +0000
changeset 417 f4b7962d39cd
parent 416 5aa55bbe4b73
child 418 a7d34a3e5786
Better documentation about the special coordinates x=0, y=0 for the crate spawn functions.
LuaAPI.wiki
--- a/LuaAPI.wiki	Wed Dec 03 05:47:58 2014 +0000
+++ b/LuaAPI.wiki	Wed Dec 03 05:58:47 2014 +0000
@@ -315,20 +315,22 @@
 
 === <tt>!SpawnHealthCrate(x, y)</tt> ===
 
-<blockquote>Spawns a health crate at the specified position.
-</blockquote>
+Spawns a health crate at the specified position. If `x` and `y` are set to 0, the crate will spawn on a random position (but always on land).
+
 === <tt>!SpawnAmmoCrate(x, y, ammoType)</tt> ===
 
-<blockquote>Spawns an ammo crate at the specified position with content of ammoType (see [AmmoTypes Ammo Types]). 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:
-</blockquote>
+Spawns an ammo crate at the specified position with content of ammoType (see [AmmoTypes Ammo Types]). If `x` and `y` are set to 0, the crate will spawn on a random position (but always on land).
+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:
+
 Example:
 
 <code language="lua">    SetAmmo(amGrenade, 0, 0, 0, 1) -- see below
     SpawnAmmoCrate(0, 0, amGrenade) -- x=y=0 means random position on map</code>
+
 === <tt>!SpawnUtilityCrate(x, y, ammoType)</tt> ===
 
-<blockquote>Spawns an utility crate at specified position with content of ammoType.
-</blockquote>
+Spawns an utility crate at specified position with content of ammoType. If `x` and `y` are set to 0, the crate will spawn on a random position (but always on land).
+
 Example:
 
 <code language="lua">    SetAmmo(amLaserSight, 0, 0, 0, 1)
@@ -336,7 +338,7 @@
 
 === <tt>!SpawnFakeAmmoCrate(x, y, explode, poison) </tt> ===
 
-Spawns a crate which looks exactly like a real ammo crate but contains not any ammo. It can be use useful for scripted events or to create a trap.
+Spawns a crate at the specified coordinates which looks exactly like a real ammo crate but contains not any ammo. It can be use useful for scripted events or to create a trap. If `x` and `y` are set to 0, the crate will spawn on a random position (but always on land).
 `explode` and `poison` are booleans.
 If `explode` is `true`, the crate will explode when collected.
 If `poison` is `true`, the collector will be poisoned.
@@ -348,14 +350,14 @@
 
 === <tt>!SpawnFakeHealthCrate(x, y, explode, poison) </tt> ===
 
-Spawns a crate which looks exactly like a real health crate but it will not heal the player. It can be use useful for scripted events or to create a trap.
+Spawns a crate at the specified coordinates which looks exactly like a real health crate but it will not heal the player. It can be use useful for scripted events or to create a trap. If `x` and `y` are set to 0, the crate will spawn on a random position (but always on land).
 `explode` and `poison` are booleans.
 If `explode` is `true`, the crate will explode when collected.
 If `poison` is `true`, the collector will be poisoned.
 
 === <tt>!SpawnFakeUtilityCrate(x, y, explode, poison) </tt> ===
 
-Spawns a crate which looks exactly like a real utility crate but contains not any ammo. It can be use useful for scripted events or to create a trap.
+Spawns a crate at the specified coordinates which looks exactly like a real utility crate but contains not any ammo. It can be use useful for scripted events or to create a trap. If `x` and `y` are set to 0, the crate will spawn on a random position (but always on land).
 `explode` and `poison` are booleans.
 If `explode` is `true`, the crate will explode when collected.
 If `poison` is `true`, the collector will be poisoned.