LuaAPI.wiki
changeset 400 0b7f8aed3c5e
parent 398 1f9f7fb00be3
child 401 aee281298267
--- a/LuaAPI.wiki	Tue Dec 02 03:40:45 2014 +0000
+++ b/LuaAPI.wiki	Wed Dec 03 01:28:15 2014 +0000
@@ -295,6 +295,34 @@
 
 <code lang="lua">    SetAmmo(amLaserSight, 0, 0, 0, 1)
     SpawnUtilityCrate(0, 0, amLaserSight)</code>
+
+=== <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.
+`explode` and `poison` are booleans.
+If `explode` is `true`, the crate will explode when collected.
+If `poison` is `true`, the collector will be poisoned.
+
+Example:
+
+<code lang="lua">SpawnFakeAmmoCrate(500, 432, false, false) -- Spawns a fake ammo crate at the coordinates (500, 434) without explosion and poison.
+</code>
+
+=== <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.
+`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.
+`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>!AddTeam(teamname, color, grave, fort, voicepack, flag)</tt> ===
 
 <blockquote>Adds a new team. Note that this can only be done in onGameInit(), not at a later time. First argument is the team name followed by color, grave, fort, voicepack and flag settings.