• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows Script Template ?


I understand that you can click on File --> Preferences --> Object Editor to define a template for the object events, which is helpful.

Is there a way to also do the same for scripts? Perhaps I've missed it, but it would be very helpful to have something like the below to appear as the default when a script is created for all of the JSDoc documentation tags.

///@func Function(input1, input2, etc);
///@desc Insert Description Here
///@param input1
///@param input2
As a workaround, maybe I can add a "code snippet" to do the same--I haven't tried though.

What do you guys do?
Last edited:


After playing around with code snippets a bit, I got one to work for the above. In case you're interested, here it is.

Link to further understand code snippets.
Link to JSDoc for Scripts.

Here is the snippet:
S - Script Doc:///@func |Function(input1, input2, etc)|;$///@desc Insert Description Here$///@param input1$///@param input2
Copy/Paste the above in a text file called snippets.txt (assuming you haven't already created one). Locate the file according to your OS (not sure about Linux):
Windows: %ProgramData%\GameMakerStudio2\User\
macOS: /Users/Shared/GameMakerStudio2/User/

Restart Gamemaker.

Now, open a new script, press F4 key and choose S. Voila! Your script will now have the JSDoc comments.

Hopefully, this helps. With as many scripts as we write though, I'm requesting that YoYo Games puts a template feature in the preferences someday (just like there is for objects), as it would be a tremendous time saver for writing documented scripts.