1. S

    GMS 2 Defining object depth by creation order

    hi I'm working on a pen&paper helper thingy that creates objects upon pressing a button (like map object;walls etc.). It's crucial that the last created object is overlapping all previously created objects and I dont know how to get that working. Sorting the depth by y-value makes no sense, I...
  2. E

    Windows Problem with room_goto(index)

    Hi! I use room_goto(index) where i replace index with a variable. But the room that it sends me to is completely wrong. I attach the pictures where you can see what i'm doing. Does anyone have a solution? For example, I am hovering my mouse over 1st button. It reads my variable - room nr 1. But...
  3. flyinian

    Does it matter what order a grid is created in the create event?

    Instead of going 0,1,2,3,4... Could it be done 2,4,1,0,3? Would this still work? Any where in the grid? any x or y position? ds_grid_add(name,0,1,value); ds_grid_add(name,0,4,value); ds_grid_add(name,0,0,value); ds_grid_add(name,0,3,value); ds_grid_add(name,0,2,value); compared to ...
  4. W

    GML [SOLVED) Stacking game?

    Hi I'm having a little trouble finding the right (and working) solution for a "stacking game". Basically I have some dragable blocks that needs to be stacked in the correct order. These blocks are taking from an array. The first block is Hydrogen (H) with a value of 1, the second is Helium (He)...
  5. L

    Controlling stacking order of code-created instances

    Hi. I'm using Gamemaker Studio Pro 1, and have run into something which I can't seem to find an answer to. I am creating random playfields (platformer), so pretty much everything is being placed on the screen via coding, rather than manually placed by me. As a result, I noticed that the...
  6. Pfap

    [SOLVED]Resource order and saving

    This is probably not a big deal, but is there a solution to avoiding resource conflicts when updating a launched game other than: once a game has been released never change the order of resources and if adding to the game only add at the tail of the tree? I guess, maybe saving the string name...
  7. T

    GMS 2 Instance Order In Layers is Glitched

    Since updating to runtime v2.2.1.287 I've noticed somthing strange. (it also happens in 291..) when deactivating/activating instances, they go back to the layer they were depending on their Creation Order! instead of their order inside the layer, and I've found no way to control it. example...
  8. I

    GMS 2 Getting sprite's "order in list" (SOLVED)

    So.. I am trying to draw_sprite() by inserting the sprite id instead of sprite name like spr_apple. But I discovered, sprite id isnt exactly what I want, because item = spr_apple.id draw_sprite(item,image_index,x,y); doesnt work. Sprite id looks like 100028 or 100020. What I want is a...
  9. MarceloP

     Set object's draw order on "instance_create_layer"

    Hello guys! I'm working on a prototype and I've reached a moment where I'd like to create some objects on a Instance Layer. I called "instance_create_layer" and got what I wanted. But since I have more than one thing that will be "dynamically instantiated" I ran into a problem. When calling...
  10. B

    In what order are the events(draw,step,etc) called?

    I want to run a script before the draw event is called and another one after the draw event. Where should i put these scripts? It would be very helpful if someone could give me the order of all the events.
  11. J

    Question - D&D Sprite order in room designer

    Hello. I've been trying to learn GameMaker 2 and use the room designer to place sprites. I'm having a problem getting the sprites to overlap in the correct order, so I created a very simple example and made a screen capture to illustrate the issue. As can be seen in the attached image, I've...
  12. P

    Ordering of Instance_Create

    I am currently trying to make a drawing game and i am still fairly new to game maker. I have made it so that when the left mouse button is held, an new instance is created drawing a line.However, when working with other colours, the layering is in the order of the the code. E.g if...
  13. M

    Windows persist objects

    hey all i have got a problem with gamemaker studio 1.4.....i have set some persist objects .in first room all are fine but at the next room all the persist objects setted to the previous room are behind the objects of the room .
  14. W

    Legacy GM Color pallet always out of order

    Hi, I have been using Game Maker Studio for years now and my color pallet always becomes disorganized after opening the image editor second time. For example, the first time I open the editor, the pallet always looks like this: However, when I open the editor a second time, it will look...
  15. NathanAuckett

    Legacy GM [SOLVED]Is there a way to re-order object execution?

    Hi! So there is a problem in our game right now caused by the order in which step events of multiple objects are being executed. To fix the problem, I need to be able to change the order that the objects execute. I thought depth would fix this, no that case. From what I've seen and read depth...
  16. DukeSoft

    Legacy GM instance_place question

    Hi guys, I'm trying to get my player object to play different footstep sounds based on what he's walking on. The ground exists out of objects (big, round, shapes) and they _can_ overlap. Now the problem is that when I have 2 circles (1 grass, 1 stone), and they overlap, it seems like...
  17. E

    [SOLVED] collision_circle return more than one value

    I am trying to draw a line from one instance to another when the mouse is on top. But if the instance running the code is after the instance in the with event it does not draw a line. How do I fix this? Here is my code: draw_self(); draw_set_colour(c_teal); if mouseOnTop == true { with...
  18. A

    Legacy GM Changing the order of code execution[SOLVED]

    So i have 2 objects, one is the hero and other is enemy so i already designed the hero's attacks and enemy's attacks, so now the problem i have is that say the user presses a button to start the attack then at that time candmg=1//a local variable in hero object then in that object collison is...