Skip to content

options

Camera perspective and movement/action key overrides.

Function What it does
options.perspective() Camera view: "first_person", "third_person_back", "third_person_front"
options.set_perspective(p) Forces the camera view (unknown names ignored)
options.sensitivity() Mouse sensitivity slider (0..1, default 0.5)
options.key(name) true while a movement/action key is pressed
options.set_key(name, down) Holds (true) or releases (false) a key binding

name is one of: "forward", "backward", "left", "right", "jump", "sneak", "sprint", "attack", "use".

set_key drives the vanilla binding. A held key stays pressed until a physical key event releases it — call it every tick to keep it held.

module:event("tick", function()
    if options.perspective() == "first_person" then
        options.set_perspective("third_person_back")
    end
    options.set_key("forward", true)
end)
Navigation

Type to search…

↑↓ navigate↵ selectEsc close