• 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!

object

  1. L

    Switching player objects in rollback multiplayer

    Hi everyone, I'm working on a multiplayer game. Currently, everyone joins in and is assigned the same object via an object placed in the map which controls rollback multiplayer and assigns everyone the player object at the start. After 30 seconds (for the time being until I can program a random...
  2. G

    GML Visual Fire Jump keeps placing windows incorrectly

    Hi I'm new to game making and I just recently finished the first part of the fire jump tutorial. However when I run the game I notice the windows keep overlapping with each other or one gets placed too high. I can't figure out what I did wrong that's causing this to happen and I've tried to...
  3. L

    Windows (online multiplayer) Randomly assigning each player their own object to play as in each round.

    Hi everybody, I'm trying to make a game that's played in rounds. Every round players are randomly assigned a character represented by an object. This process happens every round. The problem is, no sources I can find give any way to do this. They only explain how to code a single object to be...
  4. D

    SOLVED Parents and Children

    Hello GM Community Im alreaddy working with Children in form of enemy objects as a child of a general enemy object to i can check the parent and every one else is also checked then. Now i want to know if i can also pass down code so lets say i want that all enemys have a speed of 3 or that all...
  5. xS89Deepx

    GameMaker Sound play at distance

    This code work perfect if i put it in the player's step event - if distance_to_object(obj_dog) < 400, for example i have 2 enemies, dog and cat they both have different sounds. If i put 5 dogs in the room it only play 1 dog bark sound rest of them don't play sounds. obj_dog Step Event - if...
  6. Cabralito

    SOLVED delete object when it leaves the camera's field of view

    hello, I'm creating a platform game where my character shoots, but my map (room) is too big, and if the player fires the shot, he'll end up hitting the enemies on the map, which I wouldn't want to happen, and I wanted to know what is the code that causes the bullet (obj_bala) to be deleted when...
  7. R

    SOLVED Add an object/instance WHILE the game runs

    I want to make a bullet appear everytime i click shift, but in GML (its my first time using it); I need to set speed, and make it follow where i clicked shift. If you know anything about this, please share information, Thanks!
  8. B

    SOLVED repeated object in room not changing state.

    I'm coding a "button" that when it collides with a "bullet" or the player, then the button changes it's sprite subimage to 0 (by default it's 1) and when the bullet or the player collides again with the button, it's subimage goes back to one, and you can do this all the times you want, this is...
  9. Jotesco

    SOLVED Problems with backgrounds.

    I'm trying to make a moonrise and moonset,but I'm not knowing how to proceed. I need to make the moon stay always in camera,but move to go and back (moonrise and moonset). What's the best way? I tried to make a background Moon,but it's hard to me figure out how to follow camera and move at the...
  10. G

    GML Creating a new object/class from code, how?

    To start with, I don't mean create an instance, like you would with Instance_Create_Depth/Layer. Just so there's no confusion. So what I am talking about is creating a new object from whole code, likely from an external file. An example would be... So the question is somewhat twofold. 1) how...
  11. I

    Looping through all objects in a room

    I'm building a room saving system and I wanted to loop through every object in each room when you leave it so I can get the data of certain objects and save those to be loaded when you return to the room. There's a ton of different objects in each room so I can't easily just use...
  12. S

    SOLVED [?] Is there a way to get this object name in the room - GML? (inst_Door2/inst_Door1) - Solved for me with a working solution

    How can I read this Object Name in the red circle to evaluate it in an IF query ? Thanks in advance :) SiriusMonk
  13. S

    Using methods in object variables

    Is it possible to use a method for an object variable? Whenever I try doing something like below, it says "undefined variable 'function' referenced":
  14. JeanSwamp

    Spawn object based on level

    Hey! I am trying to make an enemy pool based on player level, sort of an RPG element which the higher the level you're, the stronger enemy types you will encounter. Anyone experienced with this can point me out into a smart or math based way to handle it without having to go with switch cases...
  15. K

    how to insert a non-drawn object directly on the camera view?

    What happens is that I need exactly that, so that it is possible to check collisions between an object that was inserted in the room and another, that was added directly on the view (which is equivalent to what draw gui does, but I don't I want to draw). I just want to add it by fixing the x and...
  16. ShiftyIdk

    GML Wait function for object creation

    Hello, so i'm kinda new to this and I was wondering how you would create a wait between object creation, for example, when an enemy gets close to a player, it shoots bullets but it just spams them. Is there any way to create like a 5 second wait between each bullet?
  17. AlfMandoor

    SOLVED Random Spawn help.

    Hello everyone, I would appreciate your help. This I am trying to do. 1- Object name Bullet. 2- One Bullet will be shot randomly from any of the 4 sides of the room. 3- after that bullet go out the room, another one will be shot.
  18. fishka_21

    GML Visual (DnD) How to force an object to always be next to another object?

    Hello! I don't know English well, so I use a translator. I'm also a complete GMS2 noob and don't understand the code well. In "Set Point Direction" I wrote "objectname_x objectname_y" but it always gave me an error. Then I tried like this "objectname.x objectname.y" there was no error, but the...
  19. H

    GameMaker How to create one object when two objects collide?

    I am making a slime-type enemy that when two of them collide, they turn into one bigger slime. How would I be able to do that? Any help would be appreciated.
  20. E

    Get object by id

    How do I get and object from its id. So I have the objects ID, now I need to get the object from its ID For example I have and object ID 100008. Now I need to get the object for that ID. How do I do that?
Top