Pressing the button #38
Answered
by
gilzoide
Mikhail666999
asked this question in
Q&A
-
Hello, it's me again) This time I have a problem in how to make a reaction to a click? and in lua how? |
Beta Was this translation helpful? Give feedback.
Answered by
gilzoide
Jan 7, 2023
Replies: 1 comment 2 replies
-
Like described in From GDScript to Lua, Godot's singleton objects like if Input:is_action_pressed("ui_accept") then
-- do something
end If in doubt, you can always use the Lua REPL bundled in the plugin to test out these syntax things. Screen.Recording.2023-01-07.at.19.28.32.mov |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
Mikhail666999
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Like described in From GDScript to Lua, Godot's singleton objects like
Input
are all readily available to Lua. The only change is that you need to use Lua's method notation with a:
instead of.
:If in doubt, you can always use the Lua REPL bundled in the plugin to test out these syntax things.
It's located at the bottom tab of the editor.
Screen.Recording.2023-01-07.at.19.28.32.mov