Skip to content

Controls

Generated

This page is auto-generated from psxsplash-main/src/luaapi.hh by scripts/py/gen_lua_api_docs.py. Edits won't survive the next build — fix the source comments instead.

4 entries, 2 with worked examples mined from godot-ps1/demo/scripts/ and the bundled templates.

Methods

Controls.StartIFrames(target, frames) -> nil

Set the target's invulnerability window to frames. Counts down at 60 Hz inside the SceneManager game tick. While > 0, Stats.DealDamage skips this entity. Calling again before the window expires OVERWRITES (not adds to) the remaining frames.

Example

-- Brief invuln so a flurry of hits can't insta-trigger phase 2
Controls.StartIFrames(self, 6)

Source: godot-ps1/demo/scripts/boss_smoke_brain.lua line 166.

Controls.IsInvulnerable(target) -> boolean

True if the target has any i-frames remaining. Cheap lookup; safe to call per frame.

Controls.SetEnabled(bool)

Master switch for player input. When false, the player pawn ignores stick + button events but the camera, cutscenes, music, and Lua onUpdate keep running. Use during dialogue, menus, or hit-stun. Pair with Controls.IsEnabled to gate UI actions.

Example

-- with the SetEnabled(false) at the bottom of onCreate.
Controls.SetEnabled(true)

Source: godot-ps1/demo/scripts/test_logger.lua line 273.

Controls.IsEnabled() -> boolean

True if the player input pipeline is currently active.