106 This is a list of gears which usually stay on the land for a long time and stay for several rounds and can’t normally directly placed by players. |
106 This is a list of gears which usually stay on the land for a long time and stay for several rounds and can’t normally directly placed by players. |
107 |
107 |
108 ==== `gtCase` ==== |
108 ==== `gtCase` ==== |
109 An ammo, utility, health or even a fake crate. |
109 An ammo, utility, health or even a fake crate. |
110 |
110 |
111 If the crate has just been collected, the gear state flag `gmDestroy` will be set before `onGearDelete` is called. |
111 If the crate has just been collected, the gear message flag `gmDestroy` will be set before `onGearDelete` is called. |
112 |
112 |
113 * `Pos`: Crate type: 1=ammo crate, 2=health crate, 4=utility crate (also see below) |
113 * `Pos`: Crate type: 1=ammo crate, 2=health crate, 4=utility crate (also see below) |
114 * `Tag`: Used for the appear animation |
114 * `Tag`: Used for the appear animation |
115 * `Health`: Amount of health contained in a health crate |
115 * `Health`: Amount of health contained in a health crate |
116 * `Boom`: Explosion size and damage (default: 25) |
116 * `Boom`: Explosion size and damage (default: 25) |
117 |
117 |
118 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. |
118 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. |
119 |
119 |
120 Advanced crate types: If you just care about normal crates, the values 1, 2 and 4 mentioned above are all you need to know. 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. |
120 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. |
121 || *Pos flag* || *Meaning* || |
121 || *Pos flag* || *Meaning* || |
122 || `0x1` || Ammo crate || |
122 || `0x1` || Ammo crate || |
123 || `0x2` || Health crate || |
123 || `0x2` || Health crate || |
124 || `0x4` || Utility crate || |
124 || `0x4` || Utility crate || |
125 || `0x8` || Fake crate, looks like a normal crate but does not actually contain health or ammo || |
125 || `0x8` || Fake crate, looks like a normal crate but does not actually contain health or ammo || |
127 || `0x20` || Poison trap: When the player collects this crate the player will be poisoned || |
127 || `0x20` || Poison trap: When the player collects this crate the player will be poisoned || |
128 |
128 |
129 All crates *must* have exactly one of the flags `0x1`, `0x2` or `0x4` set. Everything else can be combined at will. |
129 All crates *must* have exactly one of the flags `0x1`, `0x2` or `0x4` set. Everything else can be combined at will. |
130 |
130 |
131 Examples: |
131 Examples: |
132 * Pos = 0x1: Ammo crate |
132 |
133 * Pos = 0x9: Fake ammo crate (0x1 + 0x8) |
133 * Pos = 0x1: Ammo crate |
134 * Pos = 0x2A: Fake health crate with poison trap (0x2 + 0x8 + 0x20) |
134 * Pos = 0x9: Fake ammo crate (0x1 + 0x8) |
|
135 * Pos = 0x2A: Fake health crate with poison trap (0x2 + 0x8 + 0x20) |
135 |
136 |
136 ==== `gtExplosives` ==== |
137 ==== `gtExplosives` ==== |
137 An explosive barrel. It has its own invisible health, like a hedgehog. On low health levels smoke comes out of the barrel. |
138 An explosive barrel. It has its own invisible health, like a hedgehog. On low health levels smoke comes out of the barrel. |
138 |
139 |
139 * `Health`: “health” of the barrel: Starts at 60, explodes at 0. |
140 * `Health`: “health” of the barrel: Starts at 60, explodes at 0. |