Looks like you're not logged in

Login or Register to continue

Lesson Q&A

Use this space for questions related to what you're learning. For any other type of support (website, learning platform, payments, etc...) please get in touch using the contact form.

  • Suggestion: word order tweakPeregrinIn the section explaining the `gui_input()` method, you say the following: > ... > `_gui_input()` for `Control` nodes like buttons, text fields, and scroll bars. It's called before `_unhandled_input()` and after `_input()`. > ... That second sentence is a bit confusing to read, since the sentence is out of chronological order. `_input()` is called, then `gui_input()`, then `_unhandled_input()`, and it would flow easier for the reader if the sentence were more like this: > It's called after `_input()` and before `_unhandled_input()`. This places the chronology you're explaining in order, so the reader doesn't have to reorder the functions in their head. 1 0 Nov. 02, 2024
  • Switching between keyboard and gamepad InputMarcJIt seems to me that in some cases keyboard and gamepad input might conflict. For example if in the exercise we wanted the option for the look to be controlled with the right analog stick that would conflict with the mouse look_at functionality. Also some games have an on screen visual representation of the controls that change based on whether you're using kb or gamepad. In that case would you keep, say, a dictionary of actions with corresponding kb and gamepad controls and load the appropriate controls in the actions when switching from kb to gamepad or vice versa? 5 0 Jul. 06, 2024
  • Input singleton MarcJfrom what I'm reading here the Input singleton seems to skip the whole input propagation system from the InputEvent system. Does that mean that in practice you would avoid mixing the two methods in a game or is there a strategy to do so. for example using the singleton for the character controls and the event system for gui and other ui functionality. If so are there special considerations like turning off physics while in the menu system? 3 0 Jul. 06, 2024
  • marking input as handledMarcJin the snippet ```gdscript extends Node func _input(event: InputEvent) -> void: if event.is_action_pressed("cancel"): skip_dialogue() get_viewport().set_input_as_handled() ``` the set_input_as_handled function doesn't seem to specify the actual InputEvent being handled, does it have some hidden mechanism to recognize the InputEvent being passed to *Input? can you set other InputEvents as handled?* 1 0 Jul. 06, 2024
Site is in BETA!found a bug?