Game Development Reference
In-Depth Information
Argument hints in scripts
In all the functions that are default to GameMaker, we are able to look to the bottom of the
code editor to see exactly which arguments are required for the script to run. This is really
helpful if you forget what arguments are needed. We can have this same hint message dis-
play for our scripts, as well.
To do this, create an empty line at the top of our script and type three forward slashes fol-
lowed by the exact name of the script and an opening and closing bracket.
///scr_add()
We then type our hint message in between the brackets and separated by a comma.
///scr_add(n1,n2)
Hints should be kept as brief and simple as possible, but they can say whatever you like. In
the preceding line of code, we are using n1 and n2 as this is a good reminder of what argu-
ments to enter.
This is how the hint looks in GameMaker.
Search WWH ::




Custom Search