313 vgear = AddVisualGear(1000, 1000, vgtExplosion, 0, false) |
313 vgear = AddVisualGear(1000, 1000, vgtExplosion, 0, false) |
314 </code> |
314 </code> |
315 |
315 |
316 === <tt>!SpawnHealthCrate(x, y)</tt> === |
316 === <tt>!SpawnHealthCrate(x, y)</tt> === |
317 |
317 |
318 <blockquote>Spawns a health crate at the specified position. |
318 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). |
319 </blockquote> |
319 |
320 === <tt>!SpawnAmmoCrate(x, y, ammoType)</tt> === |
320 === <tt>!SpawnAmmoCrate(x, y, ammoType)</tt> === |
321 |
321 |
322 <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: |
322 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). |
323 </blockquote> |
323 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: |
|
324 |
324 Example: |
325 Example: |
325 |
326 |
326 <code language="lua"> SetAmmo(amGrenade, 0, 0, 0, 1) -- see below |
327 <code language="lua"> SetAmmo(amGrenade, 0, 0, 0, 1) -- see below |
327 SpawnAmmoCrate(0, 0, amGrenade) -- x=y=0 means random position on map</code> |
328 SpawnAmmoCrate(0, 0, amGrenade) -- x=y=0 means random position on map</code> |
|
329 |
328 === <tt>!SpawnUtilityCrate(x, y, ammoType)</tt> === |
330 === <tt>!SpawnUtilityCrate(x, y, ammoType)</tt> === |
329 |
331 |
330 <blockquote>Spawns an utility crate at specified position with content of ammoType. |
332 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). |
331 </blockquote> |
333 |
332 Example: |
334 Example: |
333 |
335 |
334 <code language="lua"> SetAmmo(amLaserSight, 0, 0, 0, 1) |
336 <code language="lua"> SetAmmo(amLaserSight, 0, 0, 0, 1) |
335 SpawnUtilityCrate(0, 0, amLaserSight)</code> |
337 SpawnUtilityCrate(0, 0, amLaserSight)</code> |
336 |
338 |
337 === <tt>!SpawnFakeAmmoCrate(x, y, explode, poison) </tt> === |
339 === <tt>!SpawnFakeAmmoCrate(x, y, explode, poison) </tt> === |
338 |
340 |
339 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. |
341 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). |
340 `explode` and `poison` are booleans. |
342 `explode` and `poison` are booleans. |
341 If `explode` is `true`, the crate will explode when collected. |
343 If `explode` is `true`, the crate will explode when collected. |
342 If `poison` is `true`, the collector will be poisoned. |
344 If `poison` is `true`, the collector will be poisoned. |
343 |
345 |
344 Example: |
346 Example: |
346 <code language="lua">SpawnFakeAmmoCrate(500, 432, false, false) -- Spawns a fake ammo crate at the coordinates (500, 434) without explosion and poison. |
348 <code language="lua">SpawnFakeAmmoCrate(500, 432, false, false) -- Spawns a fake ammo crate at the coordinates (500, 434) without explosion and poison. |
347 </code> |
349 </code> |
348 |
350 |
349 === <tt>!SpawnFakeHealthCrate(x, y, explode, poison) </tt> === |
351 === <tt>!SpawnFakeHealthCrate(x, y, explode, poison) </tt> === |
350 |
352 |
351 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. |
353 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). |
352 `explode` and `poison` are booleans. |
354 `explode` and `poison` are booleans. |
353 If `explode` is `true`, the crate will explode when collected. |
355 If `explode` is `true`, the crate will explode when collected. |
354 If `poison` is `true`, the collector will be poisoned. |
356 If `poison` is `true`, the collector will be poisoned. |
355 |
357 |
356 === <tt>!SpawnFakeUtilityCrate(x, y, explode, poison) </tt> === |
358 === <tt>!SpawnFakeUtilityCrate(x, y, explode, poison) </tt> === |
357 |
359 |
358 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. |
360 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). |
359 `explode` and `poison` are booleans. |
361 `explode` and `poison` are booleans. |
360 If `explode` is `true`, the crate will explode when collected. |
362 If `explode` is `true`, the crate will explode when collected. |
361 If `poison` is `true`, the collector will be poisoned. |
363 If `poison` is `true`, the collector will be poisoned. |
362 |
364 |
363 === <tt>!AddHog(hogname, botlevel, health, hat)</tt> === |
365 === <tt>!AddHog(hogname, botlevel, health, hat)</tt> === |