Questions tagged [gml]

Game Maker Language (GML) is an interpreted scripting language developed for use with a computer game creation application called Game Maker. Use this tag only for questions about language features, or requiring code in Game Maker Language. For questions relating to Geography Markup Language, use the [gml-geographic-markup-lan] tag instead. For Graph Markup Language, see the [graphml] tag.

Game Maker Language (often called GML) is an interpreted scripting language developed for use with a computer game creation application called Game Maker. It was originally created by Mark Overmars to supplement the drag-and-drop action system used in Game Maker. However, in the latest versions, all the drag-and-drop actions translate to GML rather than being separate from it.

The scripting language lacks some of the features of its parent language JavaScript, as well as of other object oriented programming features. The language also lacks proper data types and overloading.


Resources

Books


Related Tags

329 questions
1
vote
1 answer

How to implement Android Gyroscope on Game maker studio?

Game maker Studio has the option to create new GML functions using the tools that android has, it is something very interesting for me as a programmer. I was wondering how to implement the gyroscope sensor. It uses "Android.permission ..." I'm not…
1
vote
1 answer

Combining various xml elements into one collection using GML/C#/LINQ

I am attempting to read a GML file in C#. I would like to store all the returned data in one object. So far I have been able to return all the data but in 3 separate objects: XDocument doc = XDocument.Load(fileName); XNamespace gml =…
Robert Smith
  • 779
  • 1
  • 10
  • 28
1
vote
1 answer

how to write a cga shader in glsl?

How to write a CGA shader that limit the palette to 4 colors and match the original colors with those (cyan, magenta, black, white)?? I'm working on Game Maker Studio Professional, that actually allows the using of shaders writing vertex and…
Heavybrush
  • 79
  • 1
  • 10
1
vote
3 answers

Do I need to Have 16 character sprites if I have 4 classes and 4 races?

So I've started development on a rouge-like platformer. It would be difficult to explain exactly what it's like, but that doesn't matter. What does matter is how many sprites I need. I have 4 classes and 4 races. (As of now, may add more later)…
UDOTNO
  • 11
  • 2
1
vote
1 answer

Problem creating an XElement object with GML namespace

I am trying to build a XML document using the GML namespace and XML to LINQ. My goal is an XElement with contents like this: ... But I get the following: The problem is that the…
Chau
  • 5,540
  • 9
  • 65
  • 95
1
vote
1 answer

Limit drag in gamemaker

Hello I am trying to limit how much a user can drag within Gamemaker. I have created two views within a room. The first view is the full room width and size 1250x768 The second view is the area which i would like the user to be able to zoom into and…
Jivvy
  • 41
  • 9
1
vote
3 answers

GML Alarm event not working second time

I have my game setup so that it starts and goes back to a loading screen room for 45 steps after which the next room is randomized. So at alarm[0] the following code activates: randomize(); chosenRoom = choose(rm_roomOne, rm_roomTwo, rm_roomThree,…
1
vote
1 answer

selecting an inventory item

/// Drag Icon visible = oInventoryBox.visible; if(position_meeting(mouse_x,mouse_y,oInventoryIconParent)){ if(mouse_check_button_pressed(mb_left)){ // grab the item // global.heldIcon = id; } } if(global.heldIcon == id){ box =…
1
vote
1 answer

How to change the size of room at run time without changing its size in game maker itself?

I want to change the size of the HTML5 game when it runs on the web page without changing its original size in the game maker studio.
shrouk
  • 43
  • 1
  • 1
  • 10
1
vote
1 answer

Waiting in GameMaker: Studio

I composed a script in GML that is supposed to wait a few seconds before executing a script, but I tried it out, and it isn't working. Can someone help? And I don't want to use the wait/sleep function, since that delays everything in the room. Here…
Sandwall
  • 11
  • 1
  • 1
  • 3
1
vote
3 answers

Game Maker Studio, Importing games

Is it possible to import a game maker game into game maker studio? Because I want to edit the older verison of the game, that i have saved as an application?! example: if I have a game that I created an application so I could share it with friends,…
1
vote
1 answer

How to tell if an object is within a distance of another?

I have a character object and a slime object. The character can move and the slime uses the code below to move to the player. (player_obj is the character) phy_position_x += sign(player_obj.x - x) * 0.2; phy_position_y += sign(player_obj.y - y) *…
matvey-tk
  • 641
  • 7
  • 18
1
vote
1 answer

GML line of sight not working

Im am creating a game where the character will be able to run about a prison only able to see walls and characters within its line of sight. The following screenshot is the desired effect. Desired effect However I have a problem where some walls…
1
vote
1 answer

GLSL ES Check if fragment is at texture's boundary

I'm trying to make an outline shader for 2d sprites, basically it takes a sprite and checks for a color, if the fragment has that color it is considered an outline, it then checks the texels around it and if none of them are transparent its alpha is…
T.Mart.
  • 31
  • 4
1
vote
1 answer

GameMaker:Studio switch statement does not execute in http async event

Today I've had majour problems with GameMakers switch statement being executed. When the HTTP ASYNC EVENT is executed, show_message(answer) is executed, but the switch statement under it does not. I think this is a compiler error, because it seems…