# HG changeset patch # User Wuzzy # Date 1555509262 -3600 # Node ID 8b10d405a1a035f30208a92c0440c72a75b1c084 # Parent 12e1aa6294d72774e497d5af81793b38edd5a8ad LuaGameplay: Clarify controls input functions diff -r 12e1aa6294d7 -r 8b10d405a1a0 LuaGameplay.wiki --- a/LuaGameplay.wiki Wed Apr 17 14:49:53 2019 +0100 +++ b/LuaGameplay.wiki Wed Apr 17 14:54:22 2019 +0100 @@ -304,10 +304,10 @@ 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. +Masks specified player input. `mask` is a gear message bitmask (see [GearMessages]). This means that Hedgewars ignores certain player inputs, such as walking or jumping. However, the controls [LuaEvents event functions] such as `onAttack` or `onLeft` will still be called, even when masked. Example: - -- masks the long and high jump commands + -- masks the long and high jump commands, making it impossible to jump SetInputMask(band(0xFFFFFFFF, bnot(gmLJump + gmHJump))) -- clears input mask, allowing player to take actions SetInputMask(0xFFFFFFFF)