112 If the crate has just been collected, the gear message flag `gmDestroy` will be set before `onGearDelete` is called. |
112 If the crate has just been collected, the gear message flag `gmDestroy` will be set before `onGearDelete` is called. |
113 |
113 |
114 * `Pos`: Crate type: 1=ammo crate, 2=health crate, 4=utility crate (also see below) |
114 * `Pos`: Crate type: 1=ammo crate, 2=health crate, 4=utility crate (also see below) |
115 * `Tag`: Used for the appear animation |
115 * `Tag`: Used for the appear animation |
116 * `Health`: Amount of health contained in a health crate |
116 * `Health`: Amount of health contained in a health crate |
|
117 * `Power`: Ammo count in an ammo or utility crate. `0` = Use weapon scheme default |
117 * `Boom`: Explosion size and damage (default: 25) |
118 * `Boom`: Explosion size and damage (default: 25) |
118 |
119 |
119 We recommend you to use `SpawnAmmoCrate` and the like to crate crate gears instead of `AddGear`. Also note that `SpawnAmmoCrate` and `SpawnUtilityCrate` are the only way to set a crate's ammo in Lua, it can not be changed or read afterwards. |
120 We recommend you to use `SpawnAmmoCrate` and the like to crate crate gears instead of `AddGear`. |
120 |
121 |
121 Advanced crate types: If you just care about normal crates, the values 1, 2 and 4 mentioned above are all you need to know. But Hedgewars supports a few crate variants which can be spawned with `SpawnFakeAmmoCrate` and the like. The `Pos` parameter is in reality a sum of several flags which need to be added up for the final type. |
122 Advanced crate types: If you just care about normal crates, the values 1, 2 and 4 mentioned above are all you need to know. But Hedgewars supports a few crate variants which can be spawned with `SpawnFakeAmmoCrate` and the like. The `Pos` parameter is in reality a sum of several flags which need to be added up for the final type. |
122 || *Pos flag* || *Meaning* || |
123 || *Pos flag* || *Meaning* || |
123 || `0x1` || Ammo crate || |
124 || `0x1` || Ammo crate || |
124 || `0x2` || Health crate || |
125 || `0x2` || Health crate || |