YoYo Games Wiki

Template:GMvar

From YoYoGames Wiki

Template Documentation

This is a template documentation page which documents the possible uses of a template on the YoYo Games wiki.

The GMvar Template

The {{GMvar}} template is used in Game Maker Variable Articles.

General Format

The template is inserted at the absolute beginning of the article as can be seen:


{{GMvar
|title=
|description=
|scope=
|type=
}}

Arguments

All arguments are required.

title

This includes the full name of the variable. For example, for the room_height variable, the name would be "room_height" simply. The title will edit the name of the article appearing in the header and the browser's titlebar.

description

This includes a very short description of what the variable is exactly. There will usually be the need to add further explanation and elaboration of the variable and what it does, this would be added after the template as described in YY:VAR.

scope

The scope describes whether or not the variable is global or local. The input would either be "Local" or "Global". For example, for x, the scope would be:


|scope=Local

And for score, it would be:


|scope=Global

type

The type is an argument that indicates the data type of the variable. This includes the data type that should be input or that will be returned from it. Either "string" or "real" is acceptable. For instance, image_speed would have a "real" type while room_caption would have a "string" type.

editable

Describes whether or not the variable is editable. I.e. describes if the variable is read-only or read-write. The answer to the "Editable" argument would be "Yes" or "No" (notice the use of capitals) and the template will automatically convert that to the needed link.

For instance, room_height would be:


|editable=No

and therefore would link to read-only variable.

On the other hand room_caption would be


|editable=Yes

and therefore would link to read-write variable.

Uses

The GMvar template should be used in game maker variable articles. For more information about formatting Game Maker variable articles in general, see Project:Article Formatting/Variables.

Dependencies