GML - Having a variable in text

From Global Programming Syntax

Jump to: navigation, search

In this section you will find out how to have a variable in some text.

Example Code

First you will need to define the variable. So put the following in the create event: globalvar

myvariable;
myvariable=28;

Now in the draw event, put the following:

draw_text(x,y,'Text that goes before the variable '+string(myvariable)+' text that goes after the variable.');
Personal tools
languages
page stats
Toolbox