1. Edwin

    Legacy GM [Solved] Dragging object relative to mouse position?

    I want to make a simple object dragging system, but when I drag the object it teleporting to mouse position relatively it's position offset. How it looks like: How I want it to look: Well, I tried to animate it realistic and I hope you get my point. So, how I can add mouse position to...
  2. T

    Drag And Drop Spawn objects from middle top of a object

    Hi I am kind of new to programming and I am trying to make cubes spawn randomly from center top of an object/sprite, so this is what I currently have... and here is the code for the object that I want to spawn... but it end up spawning the cubes a bit to the right of the object and not in the...
  3. M

    Weird wall collision. Need Help!!!

    Hi all, I am very new to game maker so this might be simple but I have been trying to fix it on my own and can't. I am making a game in which I have two walls and two other objects that can be controlled by the player (object 1 and object 2 for simplicity). Object 1 is supposed to go through...
  4. M

    Object 2 cannot get the variable from Object 1

    The Error Report: ---------------------------------------------------------------------------------------------------------------------------------- ___________________________________________ ############################################################################################ FATAL...
  5. D

    GMS 2 What is the order of execution in GameMaker Studio?

    Hi. I'm relatively new to GMS, I am working on a small project and now I'm experiencing a weird error and I can't figure out what is causing it. I believe it got something to do with the order of execution under the hood in GMS. The story: I'm using GMS2 and GML. I have created a Game room and...
  6. Enes

    Drag And Drop How can I make an object jumping to player to a certain position?

    Right at the beginning of the game, there is an object that must jump to the player. However, it does this, but to the bottom of the player. What I want is, to jump to its head and not bottom. I already have changed the origin of both the player and the object but still not working. PLEASE HELP!!
  7. E

    Object behavior is all the same.

    This is my object spawner, which I'm currently testing with to help me understand controlling objects better. if alarm[0]==-1 { var inst_1 inst_1 = instance_create_layer(irandom_range(200,1910), 200, layer, obj_Enemy_1); inst_1.speed = choose(1,9); inst_1.image_angle =...
  8. W

    GMS 2 Script that returns a value returned from an object

    Hi GM community :) Here's a thing I need a bit of help with, and if I can pull this off I'll most likely never have to ask something here again (i know you're all tired of me at this point) Anyway I need a script that returns a value from an object. For example, let's say I wanted to ask the...
  9. FlatulenzaFiamm

    Drag And Drop Create Instance

    Hi everyone! Id like to create an object via the Create_Instance, but only one. Because using the Step Event, the object created is more than one. There is a way I could create just one? Thanks again! :D
  10. FactorX12

    Object persistence - Resets coordinates upon setting persistent again

    Hi, So I have a game I'm making, and there are parts that set the persistence of objects to false, but when I turn it back to true, the x and y of the object reset. Let's say there's an object, it's starting point upon entering the room is (10, 10) and I move it in-game to (30, 30). Then, I set...
  11. T

    Help with ds lists and objects

    Hey All, this is my first post in the community. I hope it's clear for everyone to understand. So, I'm trying to place an Id for every enemy that my project has in the room at the start, I do it with the first paragraph of code that I'm showing here. // The variable auxId is created at the...
  12. E

    Legacy GM How to activate one object in room from many others?

    Little backstory: I have an idea to make enemy spawner - box, which gonna identify where to place the 'enemy' on the floor. It is an object that I can see in room editor, so I can stretch it and thus its code will allow to register all the floor it touches and make a random desicion, where to...
  13. Edwin

    GML How to find out all values in the array as one function?

    How to find out all values in the array as one function? For example: I made an array that will keep objects that can collide player. solidObject[0] = oWall; solidObject[1] = oBox; I want to make collision with all these objects in "solidObject" array but not separately. if...
  14. P

    GMS 2 Mouse-drag object goes through wall

    I have an object (uses physics) that I drag around with the mouse. Create event code looks like this: depth = -1000; grab = false; xx = 0; yy = 0; Step event code looks like this: if(grab==true) { xo=phy_position_x+xx; yo=phy_position_y+yy; phy_speed_x = mouse_x-xo; phy_speed_y...
  15. N

    Legacy GM Depth [solved]

    How can I set the depth of one instance? Because my semi-solid-platform (one way platform) appears in front of the other semi solid platforms. See PNG: But I want it as in the room editor: That the 2 bottom platforms are in front of the top one. I knew about the object_set_depth function...
  16. XirmiX

    GML Is it better for run-time to have multiple objects or a single object with multiple states?

    Lets say you want to have different types of projectiles for different weapons. Would it be wiser for better fps to have an object for each projectile type or have the projectile be a single object that has different types?
  17. jujubs

    GML Best way to ping-pong object (SOLVED)

    Hey everyone. I'm currently working on an enemy for my game which moves down the screen whilst swaying left and right. I achieved this by making it spawn two other objects that sit beside it and send it flying to the other. This works, but makes things needlessly complicated, I guess. I can't...
  18. H

    How to attach and object to another object?

    So an object is moving from for example 1920 to 0, and an another object stay's in collision. I want the other object always being attached to the first object, how can i do it? Thank you guys!
  19. M

    Windows Hi, I'm new. How to place player on top of an object?

    I have two layers. One for the player and one for the floor. When I try to place the player object on top of a grass object it is not aligned with the grass object.
  20. shostifrosty

    Legacy GM Object movement with paths

    Hello everyone! I've been struggling for several days with the objects movement through paths, and it would be awesome if someone could help me out a little with an issue I have. What I want to do is to have pedestrians moving around in paths I specifically designed for them. So far, I could...