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
2 answers
Can I use GameMaker Language (GML) without GameMaker Studio?
I use Python to code normally. However, it isn't ideal for creating games. I found out that GameMaker Language was. I want to use GameMaker Language without actually having to buy GameMaker Studio. I have PyCharm. If there is a free IDE,…

Hex
- 59
- 1
- 12
0
votes
3 answers
How to get access to the instance variable within the Create event?
I have this code in GML2 Create event
inst1 = instance_create_layer(100, 100, "Instances", obj_genus)
inst2 = instance_create_layer(200, 100, "Instances", obj_genus)
with inst1 {
txt = "Ying"
related = inst2
}
with inst2 {
txt = "Yang"
…

Christoph S.
- 585
- 3
- 16
0
votes
1 answer
GMS2 Argument always returns undefined
I'm new to Game Maker Studio 2, whenever I try to call my script with scr_tile_collision(collision_tile_map_id, 16, velocity_[vector2_x]);, it states that the arguments are undefined. In my script I have the following, no matter whether I make the…

emoore
- 314
- 2
- 11
0
votes
1 answer
Ignoring array out-of-bounds error in GML
I'm sure this is a super weird question, but believe me, it has a point. I have an array of values in GameMaker Language, and I want to be able to search the array for values outside of the array's bounds, and retrieve those out-of-bounds values…

Veecy
- 63
- 1
- 4
0
votes
1 answer
Stop the sprite on last frame
So I have this serious problem and I don't know how to let it work. I have this in my step event:
if (image_index >= 6 && image_index <= 8) && (sprite_index == spr_sonia_down_right) {
image_speed = 0;
image_index = 7;
}
The thing that I…

Harrison 01233
- 15
- 4
0
votes
2 answers
How to add .app.src file in an independent module/handler (.erl file)
I am working on an erlang application. I want to compile and run one .erl file from src/ folder which is using environment variables from .app.src file.
So my requirement is to add .app.src file in a handler and compile/run .erl file independently.…

KJ_kaka
- 241
- 3
- 10
0
votes
2 answers
(GMS2) Spawner object doesn't spawn items
In GMS2 I have a spawner item with the following code:
In the create event:
timer = 0;
In the step event:
if(distance_to_object(obj_coffe_bean) > 2)
if(timer == 200) {
instance_create_layer(x, y, obj_coffe_bean, obj_coffe_bean);
…

SAndreeaM
- 99
- 4
0
votes
1 answer
Game maker death codes which will run when you collide with a skeleton don't work like It should
p_hp is health variable and o_skeleton is our enemy. What I want to do is to kill the player when it collides with the skeleton 3 times, but it seems It doesn't work.
What did I do wrong?
p_hp=3;
if(place_meeting(x,y,o_skeleton))
{…

Music Is Life
- 3
- 3
0
votes
2 answers
Game Maker WASD and arrow keys smooth rotation?
How can I make smooth rotation using WASD or arrow keys? I saw some exaples, but they all use mouse. I surely want to use WASD or arrow keys. I really hope someone can help me with this.
This is my code so far.
// You can write your code in this…

FeroxFelez
- 5
- 4
0
votes
2 answers
How to pause game running in background during asynchronous event?
I am creating a game in GMS2. I am using "show_message_async()" in my code. I know that when it is run, a message pops up on the screen and the game still runs in the background. However, I want the game to freeze in the background while the message…
0
votes
1 answer
Hi, I need an algorithm to tell a sprite to change the image when the in-game text finishes appearing (in GameMaker studio 1.4)
I need an algorithm to tell a sprite to end as soon as the text finishes appearing, basically I need to make a cutscene which describes the beginning of a story within the game, but since I'm using gamemaker, I don't know how to do it, can someone…

Gabry Fox
- 11
- 1
0
votes
1 answer
Issue with game over room
I am currently making my first Game Maker Studio 2 game in GML (the space rocks one from the tutorial series in the yoyo YouTube channel) and I don't know why but when I tried to run the game it didn't open and the IDE says that the issue is in the…

AmanoSkullGZ
- 141
- 1
- 1
- 7
0
votes
2 answers
Editing the get_string function in Game Maker Studio 2
Everything works yet when I get prompted up to enter my name it looks like an error. Is there anyway I can edit it?
I am new to GameMaker, this is just my personal work for fun.
I have been looking online for a solution but it does not seem to be…

Loryzuky
- 1
0
votes
1 answer
Jump buffer not playing nice with variable jumping
I'm having an issue where my player object always jumps to maximum height when jumping because of my buffer. This is my first game, so I'm playing around with Heartbeast's engine. I figure I'm missing something fairly obvious, and just hoping y'all…

LePhant
- 1
0
votes
0 answers
Tedious alarm problem in Draw Event in GMS2
I am using alarm[0] in Draw Event.
When you set alarm[0] = 1, The code in alarm event will execute 70 times; But when you set alarm[0] = 2, The code in alarm event will execute 1 time, which is expected.
I cannot figure out why. The game_speed is…

notlsd
- 1
- 2