1142 Returns the currently selected [AmmoTypes Ammo Type]. |
1142 Returns the currently selected [AmmoTypes Ammo Type]. |
1143 |
1143 |
1144 ==== <tt>!SwitchHog(gearUid)</tt> ==== |
1144 ==== <tt>!SwitchHog(gearUid)</tt> ==== |
1145 This function will switch to the hedgehog with the specifiedd `gearUid`. |
1145 This function will switch to the hedgehog with the specifiedd `gearUid`. |
1146 |
1146 |
1147 === <tt>!SetWeapon(ammoType)</tt> === |
1147 ==== <tt>!SetWeapon(ammoType)</tt> ==== |
1148 Sets the selected weapon of `CurrentHedgehog` to one of the [AmmoTypes Ammo Type]. |
1148 Sets the selected weapon of `CurrentHedgehog` to one of the [AmmoTypes Ammo Type]. |
1149 |
1149 |
1150 Example: |
1150 Example: |
1151 |
1151 |
1152 <code language="lua"> |
1152 <code language="lua"> |
1153 AddAmmo(CurrentHedgehog, amBazooka, 1) -- give the CurrentHedgehog a bazooka |
1153 AddAmmo(CurrentHedgehog, amBazooka, 1) -- give the CurrentHedgehog a bazooka |
1154 SetWeapon(amBazooka) -- select the Bazooka.</code> |
1154 SetWeapon(amBazooka) -- select the Bazooka.</code> |
1155 |
1155 |
1156 === <tt>!SetNextWeapon()</tt> === |
1156 ==== <tt>!SetNextWeapon()</tt> ==== |
1157 This function makes the current hedgehog switch to the next weapon in list of available weapons. It can be used for example in trainings to pre-select a weapon. |
1157 This function makes the current hedgehog switch to the next weapon in list of available weapons. It can be used for example in trainings to pre-select a weapon. |
1158 |
1158 |
1159 ==== <tt>!SetInputMask(mask)</tt> ==== |
1159 ==== <tt>!SetInputMask(mask)</tt> ==== |
1160 Masks specified player input. This means that Hedgewars ignores certain player inputs, such as walking or jumping. |
1160 Masks specified player input. This means that Hedgewars ignores certain player inputs, such as walking or jumping. |
1161 |
1161 |