Easily bind functions to one or more input methods.
Write:
require "/scripts/keybinds.lua"
function init()
Bind.create("up down specialOne", toggleNoclip)
Bind.create("up=false down=false specialOne", toggleSit)
end
Instead of:
local firedNoclip, firedSit = false, false
function update(args)
if args.moves.up and args.moves.down and args.moves.special1 then
if not firedNoclip then
firedNoclip = true
toggleNoclip()
end
else
firedNoclip = false
end
if not args.moves.up and not args.moves.down and args.moves.special1 then
if not firedSit then
firedSit = true
toggleSit()
end
else
firedSit = false
end
end
You should be able to find the information you need on the wiki.
If you have any suggestions or feedback that might help improve this library, please create an issue on the Issues page. You can also create pull requests and contribute directly!