Template:GMfunc
From YoYoGames Wiki
Template DocumentationThis is a template documentation page which documents the possible uses of a template on the YoYo Games wiki. |
The GMfunc TemplateThe {{GMfunc}} template is used in Game Maker Function Articles. General FormatThe template is inserted at the absolute beginning of the article as can be seen:
{{GMfunc|
title=
|description=
|arguments=
|return=
|image=
}}
ArgumentsNot all of the arguments included above need to be written and defined. titleA required field. This includes the full name of the function, along with its variables. For example, for surface_getpixel, the name would be "surface_getpixel(id,x,y)". The title will edit the name of the article appearing in the header and the browser's titlebar. descriptionAn optional but very recommended field to use. Includes a short description of the function and what it does. If there is any further explanation of the function, this shouldn't belong to the description nor any part of the template, but instead is inserted after the template as described in YY:FUNC. argumentsArguments are optional and are only written when they exist for a given function. They are written in a bullet-style. The general format of a single argument is as follows: For example, the make_color_rgb function has the following arguments: |arguments=*'''red''' ([[real]]): The amount of red to use, integer from 0-255 *'''green''' ([[real]]): The amount of green to use, integer from 0-255 *'''blue''' ([[real]]): The amount of blue to use, integer from 0-255 returnThe return is an optional variable in the template and is only written when it applies. Since only one value is returned, it is not in bullet style. A return value is written as follows: (string/real): description of the returned value. For example, the abs function has the following written as its return value: |return=([[real]]): absolute value of x imageAn absolute optional link to an image that might describe some information about a given function. |
UsesThe GMfunc template should be used in game maker function articles. For more information about formatting Game Maker function articles in general, see Project:Article Formatting/Functions. Dependencies |

