General Game Maker Language (GML) support. The programming language used in Game Maker and Game Maker: Studio.
Questions tagged [game-maker-language]
125 questions
1
vote
2 answers
GML: Getting an instance ID from a collision and accessing its variables
I am currently in the process of making a game in gamemaker. The player attacks work by getting the players stamina and storing that in a damage variable, then flying out of the player and hitting the enemy, taking twice the amount of health off of…

NextDefault
- 11
- 1
- 2
1
vote
0 answers
Fake 3D 2D First Person Engine Game Maker Studio
I have been working on just the fake 3D engine of my game for days now and can't seem to create the view in the video below. I think I have figured out how to scale the sprites correctly. I can't seem to figure out how to rotate the world sprites. I…

Pyguy
- 21
- 2
1
vote
0 answers
Side-effects of display_reset() and texture_set_interpolation()
It seems like display_reset() also resets the texture interpolation setting.
Can someone explain to me what happens internally when you mix texture_set_interpolation and display_reset? The docs tell me nothing, yet when i have interpolation enabled…

Rob
- 4,927
- 4
- 26
- 41
1
vote
1 answer
GML room_goto() Error, Expecting Number
I'm trying to make a game that chooses a room from a pool of rooms using GML, but I get the following error:
FATAL ERROR in action number 3 of Create Event for object obj_control:
room_goto argument 1 incorrect type (5) expecting a Number…

SneakyBomber
- 21
- 2
1
vote
1 answer
Game Maker Networking
Recently, I started playing around with Game Maker to make a very simple game with the ability to play online (multiplayer). I made a very simple client & server. I can send data from the server to the client, but I can't send the data from the…

Avadonia
- 45
- 8
1
vote
1 answer
Game Maker Code doing the opposite?
if keyboard_check('D')
{
x = x + 4
sprite_index = spr_playerRight
}
As soon as I start the game, the player sprite will start moving to the right. But, as you can see, that shouldn't be happening... right?
When I actually do press D, it…

user1550744
- 41
- 3
0
votes
1 answer
Timer variable not counting down in GameMaker Studio 2
I want to add a little timer so there's a delay when warping between rooms so a sprite animation can play for the player, but for some reason my timer variable isn't working and I don't know what's wrong with it.
Here's the code, this is in a…

schlime9k
- 1
- 1
0
votes
1 answer
How to draw sprites on an arc pattern in GMS2?
I've been trying to get this concept UI design working in the game:
Concept UI Design
I got the health display just fine. Then I tried to add the orbs in and here's how far I've got it so far:
What I've got
The orbs are getting drawn in the correct…

Misticloud
- 1
- 3
0
votes
0 answers
Menu items aren't selected correctly when hovered with the mouse
I made a menu where you can select options with the keyboard and mouse. The problem is that when I hover an option with the mouse, the option above is selected. To select the bottom option I have to hover outside (under) the menu, so it's not an…

MrJant
- 27
- 6
0
votes
0 answers
Problems with glsl SDF shader and Gamemaker Studio
https://i.stack.imgur.com/R3Er2.jpg
I have a raymarching shader written in GLSL ES, in it is a capsule sdf that I am trying to render. I am currently using this as a post effect, so I'm setting the shader and the uniforms, then drawing a rectangle…

Chris Legasse
- 23
- 4
0
votes
0 answers
Textbox in Gamemaker deleting
I've been having issues with my code, and so far, no one has been able to help.
I am creating a textbox, but when I run the code, it deletes it every time I click the space button and only shows the textbox for a fraction of a second.
From my…
0
votes
1 answer
Jumping animation with landing and jumping sprites
I have 3 sprites that I want to make a jumping animation with:
spr_conejo_idle - 2 frames
spr_conejo_airbourne_up - 5 frames (4 for the jump and the last one frozen while vsp < 0)
spr_conejo_airbourne_down - 4 frames (1 for when vsp > 0 and the last…

MrJant
- 27
- 6
0
votes
1 answer
Unknown variable floor_tex on Gamemaker 8.1. How to fix it?
I have a very trouble with Gamemaker 8.1.
So recently, I've followed this video tutorial which shows creating a game 3D on its game engine.
https://www.youtube.com/watch?v=0Jo0JEEukhc
I tried to test my game, but an error message shows
this.
What…

sagad ali
- 1
- 2
0
votes
1 answer
Spawning Enemies on Game Maker
I am coding a game on game maker studio in which I want a number of enemies to be spawned randomly on my grid every time the game is run. However, I am only getting one enemy on my map each time I run it.
Below is the Create instance for my enemy…

m.18
- 70
- 1
- 8
0
votes
1 answer
Malformed Assignment
I am coding in Gamemaker Studio 2 and this is my code:
if selected {
value = clamp((mouse_x-x)/sprite_width, 0, max_value);
}
if value < 0 and value >= 0.1 {
avLevels = 1
} else {
if value < 0.1 and value >= 0.2 {
avLevels = 2
}…

Anonymous
- 31
- 3