106 Example: |
106 Example: |
107 |
107 |
108 <code language="lua"> SetAmmo(amLaserSight, 0, 0, 0, 1) |
108 <code language="lua"> SetAmmo(amLaserSight, 0, 0, 0, 1) |
109 SpawnUtilityCrate(0, 0, amLaserSight)</code> |
109 SpawnUtilityCrate(0, 0, amLaserSight)</code> |
110 |
110 |
111 === `SpawnFakeAmmoCrate(x, y, explode, poison) ` === |
111 === `SpawnFakeAmmoCrate(x, y [, explode [, poison]]) ` === |
112 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). |
112 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). |
113 `explode` and `poison` are booleans. |
113 |
114 If `explode` is `true`, the crate will explode when collected. |
114 `explode` and `poison` are booleans. They are optional since 1.0.0 but mandatory until 0.9.25. |
115 If `poison` is `true`, the collector will be poisoned. |
115 |
|
116 If `explode` is `true`, the crate will explode when collected (default: `false`). |
|
117 If `poison` is `true`, the collector will be poisoned (default: `false`). |
116 |
118 |
117 Example: |
119 Example: |
118 |
120 |
119 <code language="lua">SpawnFakeAmmoCrate(500, 432, false, false) -- Spawns a fake ammo crate at the coordinates (500, 434) without explosion and poison. |
121 <code language="lua">SpawnFakeAmmoCrate(500, 432, false, false) -- Spawns a fake ammo crate at the coordinates (500, 434) without explosion and poison. |
120 </code> |
122 </code> |
121 |
123 |
122 === `SpawnFakeHealthCrate(x, y, explode, poison) ` === |
124 === `SpawnFakeHealthCrate(x, y [, explode [, poison]]) ` === |
123 Same as `SpawnFakeAmmoCrate`, except the crate will look like a health crate. |
125 Same as `SpawnFakeAmmoCrate`, except the crate will look like a health crate. |
124 |
126 |
125 === `SpawnFakeUtilityCrate(x, y, explode, poison) ` === |
127 === `SpawnFakeUtilityCrate(x, y [, explode [, poison]]) ` === |
126 Same as `SpawnFakeAmmoCrate`, except the crate will look like an utility crate. |
128 Same as `SpawnFakeAmmoCrate`, except the crate will look like an utility crate. |
127 |
129 |
128 == Position and velocity == |
130 == Position and velocity == |
129 === `GetGearPosition(gearUid)` === |
131 === `GetGearPosition(gearUid)` === |
130 Returns x,y coordinates for the specified gear. Not to be confused with `GetGearPos`. |
132 Returns x,y coordinates for the specified gear. Not to be confused with `GetGearPos`. |