GML-Getting Started

GML also known as Gamemaker language that you can use with gamemaker tool to create games. This article is intended for GML introduction and its basic usage in gamemaker.

Note: Particle Effects and engine is available only for registered users of Gamemaker.

GML is language that introduced for gamemaker tool. GML allows you to perfom operations like particle effects, movements etc using scripting. GML is very easy to learn and fast to develop and yet powerfull companion for gamemaker.

Creating simple program for GML
Lets create a simple script that prints some message on screen. Follow the steps to create scripts inside gamemaker.

- Fire up gamemaker & start new game.
- Click on Script menu option from the Resources Menu.
- Copy the code shown below:
{
show_message(‘My first script’);
}

-Now save the code by pressing the “check” symbol, now save the file.

Now to see the results we have to do something that executes the script.
- Go to Add menu> Add object, this will open up object properties window.
- Click on “Add event” button on object properties then click on “Mouse” then a menu will appear check “Left Button“. Then drop the “Execute script” control from “Control Tab”.
- When window pops up for the “Execute Script” tab you’ve to select the script0 or scriptname you have given.
- Click ok to return to Obejct properties. Now click “Ok” to close the window.

Now you have to drop the instance of obejct to room you’ve created. Now you’re ready to execute. If you fire execute then you can left-click on gamemaker window to check if window message appears. If you followed the instructions carefully then you can see the message otherwise there will be error-flagged by gamemaker.

Hope you like the short tutorial on introduction to the GML. Later we’ll discuss more about the GML and its usage.



Leave a Reply