# HG changeset patch # User almikes@aol.com # Date 1417586327 0 # Node ID f4b7962d39cd256f8cc38e036e438cfe4db65679 # Parent 5aa55bbe4b7337e12cd7e5f0415351f139191a22 Better documentation about the special coordinates x=0, y=0 for the crate spawn functions. diff -r 5aa55bbe4b73 -r f4b7962d39cd 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 @@ === !SpawnHealthCrate(x, y) === -
Spawns a health crate at the specified position. -
+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). + === !SpawnAmmoCrate(x, y, ammoType) === -
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: -
+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: SetAmmo(amGrenade, 0, 0, 0, 1) -- see below SpawnAmmoCrate(0, 0, amGrenade) -- x=y=0 means random position on map + === !SpawnUtilityCrate(x, y, ammoType) === -
Spawns an utility crate at specified position with content of ammoType. -
+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: SetAmmo(amLaserSight, 0, 0, 0, 1) @@ -336,7 +338,7 @@ === !SpawnFakeAmmoCrate(x, y, explode, poison) === -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 @@ === !SpawnFakeHealthCrate(x, y, explode, poison) === -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. === !SpawnFakeUtilityCrate(x, y, explode, poison) === -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.