Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 30896

Game Maker is a cross-platform game creation tool made by YoYo Games mostly used to develop 2D video games.

1 vote

How to stop a running timeline in GameMaker Studio?

You can use timeline_running = false; or timeline_speed = 0;
Dmi7ry's user avatar
  • 1,050
2 votes

Pixelated Text in Game Maker

If you used a small size of the view then you can set a different resolution for GUI and draw text from Draw GUI event. Create a font with needed size and just draw it. For example, if your window is …
Dmi7ry's user avatar
  • 1,050
1 vote
Accepted

How would I make a bullet shoot from my player to my mouse.

You need to use Global Mouse events. Btw, your code point_direction(obj_mouse,obj_mouse,obj_mouse,obj_mouse) is very strange. You need store result, and you need use coords (not objects names) di …
Dmi7ry's user avatar
  • 1,050
0 votes

Game maker else checks all ifs?

Gustavo Maciel wrote right answer. But I want add one more solution (sometime it can be very useful). Using code it can be something like this: var result = false; if (statement) { // action 1; …
Dmi7ry's user avatar
  • 1,050
0 votes
Accepted

Is There a Way to See Code Inside DnD Actions in Gamemaker Studio?

You can use this service. Open your object, press Show Information and copy all text to the clipboard. Then paste the data into the first text area (Paste 'Object Information' code here) and press GM …
Dmi7ry's user avatar
  • 1,050
0 votes
Accepted

Moving a UI element with an object on-screen [Gamemaker]

If you want draw text in Draw GUI event, just add Draw GUI event to the player and place code like this: var posx = x - view_xview[0]; var posy = y - view_yview[0]; draw_text(posx, posy, "Your text") …
Dmi7ry's user avatar
  • 1,050
2 votes
Accepted

Gamemaker - Maintain relative position between objects during rotation

You need to use lengthdir_x and lengthdir_y functions, like: x = owner.x + lengthdir_x(distance, owner.image_angle); // or owner.direction y = owner.y + lengthdir_y(distance, owner.image_angle); Al …
Dmi7ry's user avatar
  • 1,050
0 votes

Game Maker Studio Not Drawing Variable?

Firstly, always use view's index: draw_text(view_xview[0] + 128, view_yview[0] + 128, string(global.fuel)); Next, what you need check: Current alpha (draw_set_alha(1); before draw) Current blend …
Dmi7ry's user avatar
  • 1,050
1 vote
Accepted

Gamemaker's xprevious is the same value as x... Same thing happens for the y variabbles

GameMaker automatically stores x and y to xprevious and yprevious just before Begin Step event. …
Dmi7ry's user avatar
  • 1,050
1 vote
Accepted

Gamemaker studio - Rooms Object doesn't stick inside the square grid

Possible ways: Change Sanp X and Snap Y from 32 to 16, place objects and then change back to 32. Move center of sprite to position 0, 0. Shift all objects (all objects in the room) using 4th icon of …
Dmi7ry's user avatar
  • 1,050
1 vote
Accepted

How do I change the sprite used for an object, while the game's running?

Just change sprite by using: sprite_index = spr_armor2; Example, how it may be (Step event): if armor_mode == 0 and sprite_index != spr_armor1 sprite_index = spr_armor1; else if armor_mode == …
Dmi7ry's user avatar
  • 1,050
3 votes

Is there a way to set a range on a case argument in a switch statement in Game Maker: Studio?

You should use if: if test < 11 { test = 1; } else if test < 21 { test = 2; } else if test < 31 { test = 3; } Another example with different ranges: if test >= 5 and test <= 10 { t …
Dmi7ry's user avatar
  • 1,050
1 vote

How to run code as an instance you just created in GML

There are many ways. For example: with instance_create(posx, posy, obj_enemy) { direction = choose(0, 90, 180, 270); speed = 4; } Or you may separate creation and code: var obj = instance_ …
Dmi7ry's user avatar
  • 1,050
1 vote
Accepted

Multiplace instances of an object in Game Maker with a variable changing

If you placed all the buttons in the room editor then you can define variables in instance creation code (room editor -> RMB on an instance -> Creation Code). If you created all the buttons via code, …
Dmi7ry's user avatar
  • 1,050
1 vote
Accepted

How can I manually advance a timeline in GameMaker?

If you don't need fully automatical processing, then you can put all the moments to array and then check timeline_position with these values. A small example. You have timeline with moments 0, 100, 5 …
Dmi7ry's user avatar
  • 1,050

15 30 50 per page