hey guys, im currently running through the tutorial series by GDQUEST at https://www.gdquest.com/tutorial/godot/learning-paths/getting-started-in-2021/chapter/10.your-first-2d-game/
they just introduced the set_deferred() function in part of the scripting, I understand I think that it just delays the command inside the brackets until the next physics process starts (please correct me if im wrong) but I dont understand why I can't or at very least shouldn't just change it then and there.

he states that it is a safer action , but that leaves me with questions.

safer how? what can happen?
how will I know when to use it?
why dont we use it when we queue_free physics items?
when will I know when to use deferred over direct commands. is this something I can find inside documentation?

I have so many questions but am scared to ask so im taking a leap of faith in the godot community that I wont get flammed. please be kind. Thanks

    nofool I understand I think that it just delays the command inside the brackets until the next physics process starts

    Next idle frame, whichever the context. At least that is the idea.

    nofool why dont we use it when we queue_free physics items?

    Consider there is queue_free() & free() methods, could it be one of these essentially is sort of a combination of call_deferred() and the other method?

    nofool when will I know when to use deferred over direct commands. is this something I can find inside documentation?

    Deferring a call can itself cause issues if you are trying to have multiple things happen on the same frame, so when to use it really depends on what you are trying to do, how you intend it to work in terms of design. It realistically is something you'll learn to know via more practice, and especially by prototyping.

    But also...

    nofool is this something I can find inside documentation?

    Yes, not just reading the documentation but learning to read the documentation and understanding how exactly it is formatted can help a lot in this.

    Especially the class documentation, the properties and methods and the inheritance.