Skip to main content
9 votes

Lost in Development

The next step would be to secure a budget of several million dollar to hire a team of a few hundred experienced people, because that's what it would take to create the greatest game ever. Do you have ...
Philipp's user avatar
  • 120k
6 votes
Accepted

How to check if all switch objects in a room are set to true?

If my GML is not too rusty, the following should work: ...
Quentin's user avatar
  • 1,178
5 votes
Accepted

In GameMaker how to check if instance is a given object?

object_index This read only variable returns the index of the object that the instance has been created from. So your code would read: ...
Quentin's user avatar
  • 1,178
5 votes

In GameMaker, is it possible for users to code something into a game while playing, and verify that it is correct?

What you're describing is effectively running gameplay mechanics in a virtual machine, which can simplify the process of authoring them and insulate against bad behaviour. As it happens, a lot of ...
DMGregory's user avatar
  • 135k
5 votes
Accepted

Score over time

You can do this with a timer like this: In your Create event (or where you want to start your counting): alarm[0] = 1; Then in your Alarm 0 event: ...
Jeggy's user avatar
  • 166
5 votes

Why are the randomly generated numbers not random?

This is intended: NOTE: This function will return the same value every time the game is run afresh due to the fact that GameMaker: Studio generates the same initial random seed every time to ...
TheCell's user avatar
  • 93
4 votes

game maker place_meeting multiple objects

You will get into all sorts of problems with complex if statements. Here is the solution I use, and it works for any number of grounds. Define an object obj_ground....
Andrew Shaw's user avatar
4 votes

Jump function moves object horizontal after dash function

I would recommend trying to clean up and reduce the number of variables you are keeping track of, as more bugs are likely to develop. But on to your question: The problem you are seeing is that ...
LAMonday's user avatar
4 votes
Accepted

In Gamemaker Studio 2 how can I find out in code whether the platform is HTML5 or not?

You can check what browser the game is currently being run in with the os_browser constant. If the game is not being run in a browser the constant will be ...
Charanor's user avatar
  • 7,870
4 votes

Jumping to land x pixels ahead while not really moving (2D)

If your ground scrolls at groundSpeed = 240 // pixels per second And you want your jump to cover ...
DMGregory's user avatar
  • 135k
4 votes
Accepted

Game Make Studio 2 - Grid snap x, snap y

There are some icons at the right bottom area of the room editor. Check the first one of them:
Dmi7ry's user avatar
  • 1,050
4 votes

How to model chess knight movement in GameMaker?

Borrowing the diagram from disc_code22's answer, let's overlay it with some numbers. For each square, we're going to count how many squares it is left or right from the knight, and square it; then do ...
DMGregory's user avatar
  • 135k
3 votes
Accepted

How to fix an alarm event not triggering? [Gamemaker studio]

The alarm needs to be on the same object. When invoking alarm it's reading the local alarms, you would need to do ...
DH.'s user avatar
  • 551
3 votes

Why does my variable seem to be non-existent in GameMaker?

In the very first code of yours, you wrote: Target= instance_find(ENEMMY,i) But that's not correct, since your enemy objects are named ...
liggiorgio's user avatar
  • 4,866
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: ...
Dmi7ry's user avatar
  • 1,050
3 votes

How to clear the scores?

Just set an event which triggers the following GML code: // Clears current lives and score lives = 0; score = 0; That's it.
liggiorgio's user avatar
  • 4,866
3 votes

Stuck space invaders

I'm trying to run the code through in my head, so my apologies here. Could it possibly be that roughly 2/3 of the way down the screen, that the move_speed happens such that you can't get to a ...
derstander's user avatar
3 votes

How to make compound data in Game Maker?

Because I don't have enough reputation to comment, I'm submitting an answer that further clarifies the previous answer regarding ds_map. Here's an example of ds_map in action: ...
derstander's user avatar
3 votes
Accepted

Programmatically creating a continuous scrolling background in Game Maker: Studio

To dynamically scroll through a very large background made up of smaller frames, there are many different solution; the main idea though is quite the same. The main idea Think of your fifteen ...
liggiorgio's user avatar
  • 4,866
3 votes
Accepted

How do I check if an item no longer exists in GameMaker Studio?

It seems you have to use instance_exists(object) to check if the object has been deleted or not. This will return false when the ...
Charanor's user avatar
  • 7,870
3 votes

How to add clickable text link in Game Maker Studio 2?

Create a new object. Create event: ...
Dmi7ry's user avatar
  • 1,050
3 votes
Accepted

How do I access device camera in GameMaker Studio 1.4?

GameMaker doesn't have native support for device cameras, that's the reason you didn't find anything about it in the docs. On the other hand, you can try to access the webcam on desktop devices using ...
liggiorgio's user avatar
  • 4,866
3 votes

Help for sorting cars that are 1 lap behind the others (latecomers)

Add a per car lap counter that increments when they hit the finish line. That way you can sort the cars by that lapcount before you sort those with the same ...
ratchet freak's user avatar
3 votes

Topological sorting optimization

The video you linked already shows the solution I would suggest: split large objects into a standard tile size. This increases the overall number of objects, but allows you to use more standard sort. ...
Pikalek's user avatar
  • 12.4k
2 votes

How can I use a data grid to make an isometric turn based game in GameMaker?

Using a data structure to save level data is a good idea, as there are many games using voxel engines to deal with this kind of information. A voxel engine is essentially an engine that stores level ...
liggiorgio's user avatar
  • 4,866
2 votes

My character wont shoot when I use GML in Gamemaker

have you tried to do something like this? if keyboard_check (vk_space) || mouse_check_button(mb_left) {...} I think this should work just fine. Let me know if it ...
Jules's user avatar
  • 135
2 votes

GameMaker : how can i get the instance ID of multiple instance in a radius?

To answer the question in the title, any of GM's collision-testing functions will only return one instance, so you need to get creative to retrieve more than one. The best solution I've found (and I ...
ruds's user avatar
  • 21
2 votes

how to spawn object at tip of rotating object

By "tip of rotating object", you meant the front? If that so. You could do it easily if you have the rotation angle. Just add an offset to the bullet's spawn location/position. Speaking generally it ...
Greffin28's user avatar
  • 989
2 votes

In gamemaker studio, how do I make text boxes?

There are the built-in functions to show textboxes to the user: Read strings or integer from the user: get_string(...); (for debug purpose only) ...
liggiorgio's user avatar
  • 4,866
2 votes

how to spawn object at tip of rotating object

Probably VERY late response, but you can do this: ...
SnakeBlock's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible