# HG changeset patch # User Wuzzy # Date 1519471833 0 # Node ID 355898ec2631d261f98a226da78f9809274479aa # Parent fb89844d7b7822021574553e4a4cb27a87e33f9d LuaAPI: Move SetWeapon and SetNextWeapon diff -r fb89844d7b78 -r 355898ec2631 LuaAPI.wiki --- a/LuaAPI.wiki Sat Feb 24 11:27:37 2018 +0000 +++ b/LuaAPI.wiki Sat Feb 24 11:30:33 2018 +0000 @@ -882,20 +882,6 @@ === !SetHogTeamName(gearUid, name) === Sets the team name of the specified gear. The gear can be a hedgehog or grave. -=== !SetWeapon(ammoType) === -Sets the selected weapon of `CurrentHedgehog` to one of the [AmmoTypes Ammo Type]. - -Example: - - - AddAmmo(CurrentHedgehog, amBazooka, 1) -- give the CurrentHedgehog a bazooka - SetWeapon(amBazooka) -- select the Bazooka. - - -=== !SetNextWeapon() === -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. - - === !SetHogHat(gearUid, hat) === Sets the hat of the specified hedgehog gear. @@ -1158,6 +1144,18 @@ ==== !SwitchHog(gearUid) ==== This function will switch to the hedgehog with the specifiedd `gearUid`. +=== !SetWeapon(ammoType) === +Sets the selected weapon of `CurrentHedgehog` to one of the [AmmoTypes Ammo Type]. + +Example: + + + AddAmmo(CurrentHedgehog, amBazooka, 1) -- give the CurrentHedgehog a bazooka + SetWeapon(amBazooka) -- select the Bazooka. + +=== !SetNextWeapon() === +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. + ==== !SetInputMask(mask) ==== Masks specified player input. This means that Hedgewars ignores certain player inputs, such as walking or jumping.