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.

  • Why do we need a finished signal? Who will emit it?ForkercatHello, I have some questions about the state machine implementation. My first question is regarding the "finished" signal. Why do we need it? It is mentioned it will be used for wait state; however, it looks like the same logic can be done using a `_time` variable, like we did in LookAtState. So it looks a bit confusing to me and makes me wonder we need it and who will emits the signal. In the example, I didn't see any usage. My second question is why we use `_physics_process()` in this implementation. Is it because in this module we're dealing with CharacterBody3D? Maybe it'd be good to explain this a bit somewhere. Some other findings: 1. I cannot test `test_state_machine.gd` because Blackboard.player_global_position is still undefined. I need to comment out the lines first. 2. In `TestState._init()`, we can call `super("Test state", init_mob)` instead of assigning to each member variable. Thanks! 2 1 Sep. 17, 2024
  • Typo in sample codeRuben TeijeiroThe following sample code has a typo. Instead **SateName** it should be **StateName** > var state := State.new("SateName", mob) 1 0 Dec. 13, 2024
  • Virtual class glossary typosRuben TeijeiroI didn't find any other place to report this but I found some mistakes in the Virtual class glossary page: [https://school.gdquest.com/glossary/virtual_class](https://school.gdquest.com/glossary/virtual_class) It mentions the disappear() function when it should be the destroy() function. 1 0 Dec. 13, 2024
  • There's a bug in the state machine activation logic01_edicts_knurledset_physics_process is set to false in init(), however, since physics_process() is overridden set_physics_process is set back to true before ready() is called. As a result, the state machine is activated immediately on ready() instead of waiting to be activated. There's a note in the documentation about it: > **Note:** If [_physics_process](https://docs.godotengine.org/en/stable/classes/class_node.html#class-node-private-method-physics-process) is overridden, this will be automatically enabled before [_ready](https://docs.godotengine.org/en/stable/classes/class_node.html#class-node-private-method-ready) is called. You can fix the issue by moving set_physics_process(false) from _init() to _ready() 1 0 Dec. 03, 2024
Site is in BETA!found a bug?