1. Lens

    SOLVED How to make other objects above an specific one have their events triggered?

    Good morning/afternoon/evening! I'm making a tile-matching game and need pieces to fall once a said line gets completed (removed). Thus, I tried making a if object.y < self.y with(object) triggeringvariable = true; once it turns true, the object gets their ".y += 30". The problem is, instead...
  2. GunnyBoy

    Converting string to object name to return object ID

    I have objects used for the player to collide into to change rooms called "o_transition". Each object has a unique with a naming convention (current_room_to_target_room) and has a a variable for the current room it's in and the target room to move to in the creation code. I'm trying to find a...
  3. Lens

    SOLVED Having problems to identify multiple objects with a collision rectangle

    Hello, good morning/afternoon/evening! I'm using a collision rectangle to identify other object instances around the room, and, while there is any of those specific objects touching/being inside the rectangle, the main character (whose posseses the collision rectangle) will change a variable...
  4. T

    SOLVED Optimization: objects and instances (question)

    Hello! Are there any difference for game if I have (for example) 10 objects or 10 instanses of one object? For memory/performance/etc. I have found 2 ways to make a cutscene, and first is to create a new object for every cutscene, second is to create different instances of one object (it uses...
  5. Akhos

    GMS 2.3+ Question regarding Object Order and script_execute in GMS 2.3

    (I'm not currently in the beta so I thought I'd pose the question here, hopefully someone can help me before the official release!) So in my current project (a fighting game), I have the ability to save replays and play them back. I have a fast forward feature that lets you play through the...
  6. conman06

    GMS 2 Global Variable not working??

    Ok, so I'm making a game in which you click the trees, then they give you wood. I need to make an object to show how much wood the player has. In the tree object, I have these scripts for the Global Variable "Wood": global.Wood = 0; //When Tree clicked, add +1 wood and disappear. if...
  7. TyGamess

    Drag And Drop with Path-Finding

    Idk if was a post already. But how to i drag and drop an object that has path finding codded into it? Here is the code I have so far: if treached = false { sprite_index = spr_villagerMoving if (!instance_exists(target)) { // create new target var gx =...
  8. kureoni

    custom mouse object being overlaped by other objects (except player sprite)

    did a custom mouse for my game but i would like to set it on the first game layer so it would not be overlaped by anything any ideas?
  9. Rare Truffle

    GMS 2 Multiple Object collision possible?

    Hey yo! I've searched through the forum but couldnt quite find a fitting solution for my problem. I hope one of yall can help me: I am making a simple 2D Platformer on GMS 2. I wrote a code, so if the player gets near "Obj_Block_1" the Player collides with the Object. In other terms it becomes...
  10. S

    How to call a certain part of a script on certain frames?

    Hello, this is my first post after weeks of using the forums as an excellent resource. I come from a Python background and there are built-in functions such as wait(), which allow me to 'pause' the execution of the script. I have written a script (shown below), which currently causes my NPC to...
  11. N

    GML Object Variable being utterly ignored

    if state == 0 && instance_exists(ob_electron) { // Only if the wire is active and the the electron is present will this code run. var e = instance_nearest(wire_start_x, wire_start_y, ob_electron); // Assign the nearest instance a temporary variable. if...
  12. Z

    GML Trouble with Enemy Attack Sprite Manipulation

    I have just completed the wonderful GML2 Complete Platformer Tutorial series by Shaun Spalding on Youtube. The code is identical to how he set up his simple shooter, I have just changed the art and little details and values here and there, and everything works! However, my enemies do not have...
  13. jobjorgos

    GML [SOLVED] how to send variables to the unique instance that the object creates?

    I want for each obj_train_cart object to create an obj_inv_block at it own x and y, and that keeps on the x and y also every step after it has been created. But now I get errors that say: variable obj not set when reading it in the step event. What can I do? OBJ_TRAIN_CART Create Event: obj =...
  14. Daniel Mallett

    GMS 2 Event / object driven

    I have been using Game maker for a while. It's worked very well for me up till now. It has recently come to light that I may have been doing this wrong the whole time. I understand that GMS2 has events obviously. Draw create step. Great. Until now I have been doing things like if mouse is...
  15. Edan Momu

    GML 2 Linked objects linked by a Chain

    I'm working on a top-down game and I want to create a mechanic where the player is chained to a metal ball the metal ball can move but it slows down the player. And I'm having a problem with getting it to work properly. I need the player to be able to move, if it's further than the length of...
  16. A

    Legacy GM Draw chain on freely moving object

    Have you ever seen how a chain chomp works? That's basically what I'm trying to accomplish except the object can move freely around the room. The starting point of the chain (white) should either stretch however many chain links evenly across the line between the starting chain and the object...
  17. J

    Collision Object/Collision mask

    Helloo! I am using Game maker Drag & Drop and I have a problem with my collisions masks ( I guess?).. But first the problem: I have a collision object with a normal collsion set up, so my player should be able to walk on it and against it, but not through it. But since I scaled the collision...
  18. Architheutis

    [Solved!] Collision mask to be changed

    Hi there! I`m still in final works of my game. I remarked a simple, but annoying problem: My jump`N`running idle does everything he should. So far so good. But if I duck, he goes down on ground, to dodge incoming enemies. But because of a line in the code within my Player-object, the ducked...
  19. William Garrison

    GMS 2 instance create (and resize)

    So I have a thing that creates a flame when you click... problem is I use a sprite thats too big. I dont want to manually resize the sprite. I want to be able to set the size in the command when it creates. How can I do that? Left Pressed instance_create_layer(mouse_x, mouse_y, "Flame", oFireSml);
  20. A

    Having Manager object to check if there's another one

    Hi! My manager object (an object that handles most of the global fuctions and stuff, and is persistent) have many instances scattered across some of rooms in my project. I want them to check if theres already one in the game (before activating and/or executing its tasks) and if there is another...