• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

instances

  1. Fredrik

    [SOLVED] Saving and regenerating instances that the player has spawned

    Hey! A few days ago I asked for help on how to make a system to save 'states' for various instances that have been changed by the player, like in a dungeon crawler if the player break a crate or open a chest, to then go down to a new floor, and then back up to the previous one again, and how to...
  2. S

    GameMaker is there a way to send instance id's over network?

    hello I am getting into udp networking in gamemaker and I was wondering how to sync a object by a instance id? I keep getting back different ids then what is on the other end. I would think instance id's start from some base number and amount sequentially during the programs life but it seem...
  3. Z

    (SOLVED) Changing a group of instances with the same pre-condition

    Hi everyone! I have an object that is spread across a room, meaning there are many instances of that object. In the instances creation code (not in the object create event, but in the instances creation code in the room editor) I gave "groups" of these instances a specific value. Some of these...
  4. R

    GameMaker Failing to read an instance's variable

    Currently trying to make it so, when my cursor is over a specific object instance (in this case, an instance of obj_cat), it should print the 'lastname' variable stored in the instance. I think I am having trouble with setting the variable properly, or else the scope is wrong somehow. The...
  5. Q

    GameMaker [SOLVED] Spawning four instances at once

    Hello!!! I came across a problem that when I fire a gun, four instances of a bullet are created at once (each on top of other). I really don't have idea what causing this problem :/ I have a parent o_player obj, which have three childs. Each child inherits whole step event from the parent. At...
  6. J

    How to make single Instance of an Object change Direction when Player passes it

    So I'm developing a side scrolling game titled 'Gulpy' (my first game) and I'm having trouble making a single instance of an object change direction when the player passes it (in this case the object are tiny fish that the player must eat). I'm trying to make it so that each fish that the player...
  7. Z

    (SOLVED) Order of priority in instance code (Basic question)

    This might seems like a stupidly basic question, but I need to make sure. If you have multiple instances of the same object in a room, and that object "spawns" more of these instances on a grid, it's obvious you don't want to allow a situation where spawned instances are spawned on top of each...
  8. 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...
  9. L

    GML [SOLVED] Pseudo Room Problem - Space Game

    Hello all, this is my first post so apologies if this is in the wrong place or badly formatted. In my game, you fly a spaceship. This spaceship has multiple levels, but the ship as a whole stays in the same room (so your position in space and other objects in space don't change). I have sprites...
  10. 2

    GameMaker Studio 2: Finding Top Most Drawn of All Instances at Mouse Cursor on Click

    I need to make something that will return the top most instance where the mouse cursor is currently clicking. This is probably different in Studio 2, so how would I adapt the code below? It doesn't matter if the draw order is always the same, just that I can find from multiple instances at the...
  11. Z

    GML instance_nearest not working

    I need the guide point for the pedestrians in my GTA 2 styled game to find the nearest direction object so they can start the loop of walking along sidewalks. Long story short, I want them to get the nearest ped direction object, using a variable called resetPoint. This is the code I used...
  12. M

    GameMaker 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...
  13. C

    Question - Code Problem with enemy bullet directions

    I'm creating a platformer game. I want the enemies to constantly shoot in the direction they're facing, but I'm having a problem: the direction of the enemy bullets are all in sync. (In other words, one of the enemies correctly shoots in whichever direction it is facing, but all the other...
  14. P

    GameMaker [ SOLVED ] repeat/for loop not working as intended

    This is the code: repeat (instance_number(obj_work_table)) { var xx = obj_work_table.x; var yy = obj_work_table.y; var notif = obj_notif_arrow_down; var notif_x = xx; var notif_y = yy - 450; // Create the arrow notification above the workbench notif_work_table =...
  15. Papa Doge

    GML [SOLVED] Multi-Switch Logic is Broken

    I'm working on a test room for my game that includes objects that have active and inactive states that are toggled when the player throws a Projectile that hits a Switch in the same room. So far, I'm playing with the following objects... - Switches that toggle the states of doors and platforms...
  16. W

    Mac OSX Question | "Drawing" Multiple Instances

    I'm using a Mac to develop with Gamer Maker Studio 2. I'm trying to "draw" multiple instances into a room by dragging the mouse while holding the Alt key, though I understand this must be exclusive to PC. I'm following Shaun's platformer tutorial where he mention's "drawing" instances by holding...
  17. K

    Destroy one instance of an object help

    So, my problem is that i wanted to destroy for example a bullet that i created with my keyboard_check(mb_left) and if that bullet hits a wall it destroys itself everything is fine but if there are more than two bullets every bullet gets destroyed. Bullet Step event if (place_meeting(x , y...
  18. C

    Legacy GM Multiple objects using same particle system

    I'm trying to use same particle system on multiple objects with different part_type settings, but for some reason the objects use the same settings when using part_particles_create. What I noticed is that draw event and particles work differently on this area: ///Draw event...
  19. Turbulence421

    GameMaker Is deactivating worth it?

    Hello, I'm have a platformer game in GMS2 that currently deactivates instances outside the view every couple steps in order to help with processing power. However, I have heard that deactivating instances doesn't always help and it might wind up slowing the game even more if you have a lot of...
  20. giraffeman210

    Instance Help DnD

    I am working on a game using drag and drop. In my game instances spawn at random and then roam until destroyed. I would like these spawned enemies to shoot a bullet object in whatever random direction they are facing but I don't know how to do that without the bullets moving in the direction of...
Top