



The actual code looks something like this: IMPORTANT! Please see the individual "set" scripts for more extensive information about each of the different variables.Īpart from comments you can also use special #region tags to mark a section of code for Code Folding, and each region can contain a comment. How this works is that you add a #region tag - along with any comment text - to the top of a section of code and then add a corresponding #endregion tag to the bottom of the section and then you can "fold" the code, ie: hide it away so you can cut down on the number of lines of code visible in the editor at any one time: Setup GIF Variables to initial values (these can be edited so you don't need to use the setter functions all the time if you are always using the same values) You may also leave multi-line comments, to give credit, to omit a complete section of code for debugging, or even to leave notes about how you want to change the code in the future. To leave a simple one-line comment, the first thing you can do is use // before the text. In this way you can leave notes to yourself and to your colleagues, or to explain a particularly tricky piece of code, or even just leave a reminder about what something does, or what you want something to do in the future. In GameMaker you have various mechanisms to help you leave notes and comments about code sections and even whole blocks of code that can be seen in the event list of the object that you are currently editing. When working in collaboration with other people, when dealing with a large project, or even just for your own reference and debugging, leaving comments in your event code and scripts is very important.
