Use the expression builder so that GDevelop writes complex expressions for you. Although it is quite useful to understand this syntax and it’s fairly easy because GDevelop auto-completes what you start typing and gives you documentation on what the function does.
For example, before reading your question, I didn’t even know about AnimationFrameCount()
myself. To learn that, I just created a Sprite in an example project, created an event, and used this mechanic to list what functions were available for me on this type of object.
Allow me to give you a basic introduction
YOUR_OBJECT
is called an “object” and each type of object has its unique methods. Sometimes, multiple types of object have similar methods and properties. A method, or a function, is an effective way to retrieve data, or calculate something, based on the unique properties of the object. You “call” (execute) a method when it ends with parenthesis “()”. In these parenthesis, it is sometimes required to give parameters to customise the output. For instance, you can calculate the distance between two objects using Object1.Distance(Object2)
. Use the expression builder or type it in using the auto-completion and the built-in documentation yourself.
Also, I didn’t quite understand what you meant by this:
If you don’t know what the debug console is, well, basically it’s the best way for you to make your program communicate with you as it is being executed. Sometimes, if you struggle on something, and don’t really understand the output of an expression for example, then you can “log a message” on the console to see what exactly is happening in your events sheet at a precise moment. The debug tool is the best ally of a developer, even a no-code developer. I strongly recommend to try and use it as often as possible when facing an issue.
However, to open the debugger, you’ll have to open the preview in “debug mode”:
It opens a new tab at the top of GDevelop:
Use the “pause” button at the top-right of the screen to see details about each instance of object you have placed in the scene, and open the console, at the bottom, to see the messages your events sheet return.
I hope this fast tutorial is useful to you.