LuaAPI.wiki
changeset 1245 355898ec2631
parent 1244 fb89844d7b78
child 1246 0f08b9671715
equal deleted inserted replaced
1244:fb89844d7b78 1245:355898ec2631
   880 Sets the name of the specified hedgehog gear.
   880 Sets the name of the specified hedgehog gear.
   881 
   881 
   882 === <tt>!SetHogTeamName(gearUid, name)</tt> ===
   882 === <tt>!SetHogTeamName(gearUid, name)</tt> ===
   883 Sets the team name of the specified gear. The gear can be a hedgehog or grave.
   883 Sets the team name of the specified gear. The gear can be a hedgehog or grave.
   884 
   884 
   885 === <tt>!SetWeapon(ammoType)</tt> ===
       
   886 Sets the selected weapon of `CurrentHedgehog` to one of the [AmmoTypes Ammo Type].
       
   887 
       
   888 Example:
       
   889 
       
   890 <code language="lua">
       
   891   AddAmmo(CurrentHedgehog, amBazooka, 1) -- give the CurrentHedgehog a bazooka
       
   892   SetWeapon(amBazooka) -- select the Bazooka.</code>
       
   893 
       
   894 
       
   895 === <tt>!SetNextWeapon()</tt> ===
       
   896 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.
       
   897 
       
   898 
       
   899 === <tt>!SetHogHat(gearUid, hat)</tt> ===
   885 === <tt>!SetHogHat(gearUid, hat)</tt> ===
   900 Sets the hat of the specified hedgehog gear.
   886 Sets the hat of the specified hedgehog gear.
   901 
   887 
   902 === <tt>!SetGearTarget(gearUid, x, y)</tt> ===
   888 === <tt>!SetGearTarget(gearUid, x, y)</tt> ===
   903 Sets the x and y coordinate of target-based weapons/utilities.
   889 Sets the x and y coordinate of target-based weapons/utilities.
  1155 ==== <tt>!GetCurAmmoType()</tt> ====
  1141 ==== <tt>!GetCurAmmoType()</tt> ====
  1156 Returns the currently selected [AmmoTypes Ammo Type].
  1142 Returns the currently selected [AmmoTypes Ammo Type].
  1157 
  1143 
  1158 ==== <tt>!SwitchHog(gearUid)</tt> ====
  1144 ==== <tt>!SwitchHog(gearUid)</tt> ====
  1159 This function will switch to the hedgehog with the specifiedd `gearUid`.
  1145 This function will switch to the hedgehog with the specifiedd `gearUid`.
       
  1146 
       
  1147 === <tt>!SetWeapon(ammoType)</tt> ===
       
  1148 Sets the selected weapon of `CurrentHedgehog` to one of the [AmmoTypes Ammo Type].
       
  1149 
       
  1150 Example:
       
  1151 
       
  1152 <code language="lua">
       
  1153   AddAmmo(CurrentHedgehog, amBazooka, 1) -- give the CurrentHedgehog a bazooka
       
  1154   SetWeapon(amBazooka) -- select the Bazooka.</code>
       
  1155 
       
  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.
  1160 
  1158 
  1161 ==== <tt>!SetInputMask(mask)</tt> ====
  1159 ==== <tt>!SetInputMask(mask)</tt> ====
  1162 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.
  1163 
  1161 
  1164 Example: 
  1162 Example: