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 0 Sep. 17, 2024
Site is in BETA!found a bug?