General Game Maker Language (GML) support. The programming language used in Game Maker and Game Maker: Studio.
Questions tagged [game-maker-language]
125 questions
0
votes
0 answers
Game Maker Studio HTML5 Text displaying problem
In Game Maker Studio 2 text object is poorly displayed when i exporting my game to HTML5
DRAW…

gadyka5
- 1
- 1
0
votes
0 answers
GML - Not passing through a part of the code
This is a Trigger Warp code:
if (needEnter) {
if (keyboard_check(vk_enter)) {
audio_play_sound(door_open,0,0);
room_goto(targetRoom);
obj_player.x = targetX;
obj_player.y = targetY;
obj_player.image_index…

Lucas Ruiz
- 1
- 1
0
votes
1 answer
2D Array not properly accessing globalvar (GameMaker)
I have a shop that I am attempting to set up that by all accounts inside of the Debugger is triggering, but doing absolutely nothing.
This is the set up that I have:
o_Shop - Player interacts to create a layer inside of room0
o_Shop_setup - Creation…

Shamus Locke
- 3
- 4
0
votes
2 answers
Ball gets stuck inside paddle in pong clone (Gamemaker)
I am currently making a Pong clone in gamemaker (My first stand alone project in gamemaker).
When the ball collides with the paddle, I reverse the x_speed (reversing its direction by taking it * -1). However, when the ball hits the top or bottom of…

frogmasta
- 13
- 5
0
votes
0 answers
In GameMaker Studio 2, retrieve non-persistent object from another room
I have a game which consists of 2 rooms - upper floor and lower floor.
I want to create a path for an object on the lower floor, while the displayed room is the upper floor.
The object that walks the path is persistent, but it will only be drawn if…

n00b programmer
- 2,671
- 7
- 41
- 56
0
votes
1 answer
Projectiles In Gamemaker Studio 2 Not Moving
My gun's begin step code:
if (global.night == true) {
image_angle = point_direction(x, y, mouse_x, mouse_y);
image_index = 1;
alarm[0] = 0.5 * room_speed;
firingdelay -= 1;
if (mouse_check_button_pressed(mb_left)) &&…

Teo
- 13
- 5
0
votes
1 answer
falling platforms game maker studio 2
I am trying to put platforms in game maker studio 2 that fall when jumped on, but my character stops jumping while the falling with the platform, how do I fix this? Note that my character can jump if the platform rises
here is my falling platform…

Matthew Kreke
- 13
- 3
0
votes
1 answer
How to create multiple different enemies by one instance
I want to create one instance, named obj_enemy and I want to place several of them in one room but each one has to use different path and weapons, so is there a function etc to use? like an object id to give each one different event.
or should i use…

ZozeR
- 78
- 1
- 10
0
votes
2 answers
Drawn Squares Constantly Flicker Between Assigned Colors
I am very new to GameMaker 1.4, but I have some experience with Python and C++. I have created a matrix of random ints between 1 and 5 inclusive to represent the number of stories each building on a map has. I want to use this to draw a 10x10 set of…

LuminousNutria
- 1,883
- 2
- 18
- 44
0
votes
2 answers
How can you initialize an entire array at once in GML?
I want to initialize an entire array at once but I can't find any examles of this being done anywhere.
I want to do something like this:
int a [][] = {{0,1,0},
{0,1,1},
{2,1,0}};

Josef Buchko
- 31
- 1
- 4
0
votes
1 answer
Gamemaker using variables from maps
I have an object with its own inventory, for which I use a list of maps.
Each item has a name and x and y offsets.
I want to draw each item with its offset on top of my other object, and have them turn along with the original object, so inside the…

b9s
- 517
- 4
- 13
0
votes
1 answer
Gamemaker - destroy a specific instance without collision event
I've just started using gamemaker studio 2 and I've been scratching my head over this one for a while.
I need to be able to destroy a specific instance of my enemy object without using the collision event. Here is my current code:
In my player…

Marco
- 99
- 2
- 6
0
votes
1 answer
Creating instance for non-existing object: | What Did I Do Wrong?
Every time I run my little game, it throws me the following, fatal, error:
ERROR in
action number 2
of Trigger Event:
for object obj_y:
Creating instance for non-existing object: 100012
I have no idea what's causing it. The only time I use…

ErikB26
- 27
- 3
0
votes
1 answer
Gamemaker: Ball won't bounce off wall on its own
The initial idea is to have the ball reflect off the wall object and carry the same speed once it bounces off. Thanks in advance.
if (place_meeting(x,y + vsp,o_wall))
{
while (!place_meeting(x,y-sign(vsp),o_wall))
{
y = y *…

James Marlin
- 13
- 1
- 7
0
votes
1 answer
WPM formula doesn't work
I'm using the following code to calculate WPM (words/minute), CPM (chars/minute), CPS (chars/second) and Accuracy in a typing software.
//wpm
global.wpm = global.total_words / runtime_min;
//cpm
global.cpm = global.total_chars /…

Lerrrtaste
- 35
- 1
- 7