All Questions

Community

g
david godefroy
posted to: Course conclusion

finalisation

hello, i have two recursive error which prevents me from finalizing the course, even by copying the final code of the two error, it returns, can I make you follow the code in zip, maybe if you have time you can report the error that I do not see, thank you


  • Nathan Lovato replied
    Solution

    I checked the .zip file you sent me via email. Here are the fixes to your issues:

    • You attached PlayerState.gd to the Move state node instead of Move.gd. That's what the error message was telling you: the variable "velocity" doesn't exist on the type Node (PlayerState.gd).
    • In Game.gd you wrote Input.mouse_mode instead of Input.set_mouse_mode.
    • There are typos in Move.gd at lines 20 and 21. You wrote "basic" instead of "basis"
    • There are typos in Camera.gd, you wrote "get_action_strenght" instead of "get_action_strength".
    • There's a missing input map action, toggle_mouse_captured
    • You need to rename the variable camera_rig in Player.gd to camera
    • You're missing the is_moving variable and related code in Mannequiny.gd

    This gets the game running without errors. However, the camera still doesn't follow the player.

    Did you test the game after every lesson? To me, it looks like you followed the videos without running the game often. Doing so makes it hard to track down the remaining bugs, as they don't cause errors or crashes. By testing often, you can better know what change or addition might have introduced the bug.

  • g
    david godefroy replied

    thank you very much for all your corrections, it is obvious that i could not test the different stages because the bugs appeared already therefore at the level of the attached PlayerState.gd to the Move state node instead of Move.gd, so I was walking in round without finding the origin of the bug, thank you for sending by email the corrected solution and thank you again for your incredible tutorial work on your platform

  • Nathan Lovato replied
    Solution

    You're welcome. What I mean by testing at every stage is not only testing after every lesson, but also fixing the issues as soon as they appear, redoing the last lesson that got you stuck if necessary. You can also ask me like you did. Because if you keep going with bugs, you accumulate errors that make it harder and harder to make the game work again.