• Hey! Guest! The 37th GMC Jam will take place between May 28th, 12:00 UTC and June 1st, 12:00 UTC. Why not join in! Click here to find out more!


  1. D

    SOLVED Trouble creating instances of node/tile objects via create code of another object

    I'm using GM2, following a tutorial that was made for GM1. I've run into a few little differences already, but I'm stumped on what's going on here. I've got 2 objects right now. The first is a node object that acts as the tiles that comprise the game map. The nodes aren't placed themselves...
  2. F

    SOLVED What causes an object to change it's depth?

    I have two objects that are in a room together. These objects are persistent and the room is an initialization room. in the initialization room: object1 is depth of 0; object2 is depth of 100; on room change, object1 changes it's depth. in room 1: object1 has a depth of 200 object2 has a...
  3. D

    How to use shaders to make parts of an object transparent based upon contact with another object?

    I am trying to make a game in GameMaker 2 where objects become transparent depending on the object behind them. I currently have it so I am just checking each step (within the object to become transparent) whether in contact with the background object and then setting alpha to 0.5 if true. Here...
  4. FrostyCat

    Asset - Scripts Extended Collision Functions

    Extended Collision Functions Companion scripts for built-in collision functions Overview Extended Collision Functions are enhanced versions of built-in collision functions. You can now easily check for collisions with multiple unrelated objects/instances at a time, and optionally pass in a...
  5. F

    (SOLVED)Looking for ideas, suggestions and so forth on how I should manage my persistent code.

    In my current project I have to keep track of numerous changing numbers. i.e cash, statistics, etc. I am currently planning on placing all of this code in a single object and making it persistent. Would this be a good idea? What do you recommend? Thanks.
  6. F

    I need clarification on placeing objects in a room.

    Correct me if I am wrong: If I have an object and I place it into a room, that object in the room becomes an instance of said object. That instance will be at the x and y position that I placed it at in the room. All is fine, however it is recommended to code your x and y positions within that...
  7. M

    Windows A question about arrays

    Hello. Excuse my english grammar I'm not a native speaker. I'm new to programming gml and I hope to learn more about this subject. I'm currently working on a collision system that's easy to use. I made a script in the resources tab containing an array of objects my player should be able to...
  8. SirCaliber

    GML [SOLVED] Objects will start with a random hsp variable, but only when created by a certain object.

    I have an object, oCorpse, that creates a random amount of oLoot objects when it is created. In those oLoot objects' create event, they get a random hsp and vsp variable. But the hsp only works if it was created by oCorpse, not by oChest. (oChest) On Collision with oBolt: with(other){...
  9. SendTheGravy

    Coding help

    I'm SUPER new to game maker and just need a bit of help with some coding. Let's say I have two Objects, Object A and Object B. I want to make it so when I interact with Object A, Object B's sprite changes. How would I go about doing this? Help is much appreciated :)
  10. Smenkare

    Creating from, picking random and adding to ds_map

    Let me explain my problem in this example. i have variables for each object objvar1 = 1 obj1disable = false objvar2 = 1 obj2disable = true objvar3 = 3 obj3disable = false objvar4 = 1 obj4disable = false one empty ds_map and i have 4 objects...
  11. Obj_Neil

    GMS 2 How to grow and shrink an object gradually

    I am not sure if there is a bug or something but I cannot get shrinking to work. It works for making an object grow, but the same thing doesn't make the object shrink. I am changing the xscale every step by adding to it. Also, the same logic but used on the radius of a circle drawn in the draw...
  12. B

    [Solved] create objects in predefined location in room checking collisions

    I need to create 25 block objects in a predefined space (within the view area), only random and checking collisions with other objects and only appearing in place free, but I can't. delimitations (area where the object needs to appear inside): x 32 --- x 640. y 64 --- y 960. P.s: the object in...
  13. S

    Sprite Swapping For Enemies VS Individual Objects

    I’m designing a platform game that will have different enemies depending on level/room and I was interested in whether just changing an object’s sprites based on the level/room was a potential way to go? For example: Each level/room would have an enemy that crawls back and forth along a platform...
  14. tagwolf

    How to plan and manage code for larger projects

    Game Development Code Planning GM Version: ANY (and not just for GameMaker, however this will be GMS2 "centric") Target Platform: ALL Download: N/A Links: N/A Summary: This tutorial will go over code and object planning for game (and application) project development to minimize re-coding and...
  15. C

    GMS 2 Script to detect distance to object only working with one object.

    hi guys and girls, I am having some issues with a script I have made, Basically I want a space ship to drive up to a planet object and when its inside the diameter of the planet object get smaller (as if to land on the planet) I have got this working correctly if...
  16. P

    Help with "other" (Drag & Drop)

    I'm trying to move all of the other objects in the room except for the object containing the code itself, and used this: but none of the objects moved except the sprite with the code. (basically the opposite of what I'm trying to achieve) Can somebody help me?
  17. Vinicius Alvarenga

    3D help(Crosshair checking with an object)

    Soooooo I'm making a 3D game inspired in I'M SCARED, and I'm with a problem. I made a obj called key, and the sprite and the creation of it in the world it's already done, but, I've made a crosshair using draw GUI and I want to take that key when the crosshair is above it maybe pressing the...
  18. P

    Assigning data from one object's variable onto another using "with"

    Hi guys, I'm making a space trading and top down simulation game similar along the lines of the Patrician series and somewhere along the code I've run into an issue I'm quite unable to solve by myself. Most of code structure is established by now and all it's left is to assign resource transfer...
  19. K

    Windows Non - intentional transparency issue with objects

    While the game is running, some objects appear as transparent while others are completely fine. I have a feeling that it might be an error with GameMaker Studio 2 itself but I'm not so sure. I made a new project and imported/copied over the same sprites, objects, and code and the transparency...
  20. MadTinkerer

    GMS 2 Getting Object Variables?

    Getting the value of instance variables is easy. You can just say myNumber = obj_OtherObject.myNumber or something like that and it will work. You can also get the value of certain variables. object_get_sprite will get the sprite index of an object. object_get_parent will get the index of the...