instances

  1. D

    Question - Code instance_create_layer() issues

    Hi all, I've been having some issues with instance_create_layer() and wanted to see if anyone else was also experiencing issues. Straight off it appears that there is a small typo on the documentation located here whereby the 'obj' for the final argument is written down as 'y'. The bigger issue...
  2. 6

    Destroy every instances expect one

    Hello All! I'm making a shootemup and i'm quite a begginer in programming. So i've made a powerup system and now i'm making the last one the bomb. I think i'm going quite fine with it but i don't know how to kill every enemies without destroying them one by one. So i'm using collosion circle and...
  3. Lumenflower

    GML Drawing instances at the same position only once.

    Okay so that title probably isn't super helpful. Here goes... Basically I've made a little engine where a bunch of ships move around a node-based map. Each node can have up to four connections (North, South, East and West). One ship is controlled by the player, and you can either hit up, down...
  4. 2

     Suggestion: Instance Delete by: Right Click, Back Space, and Erase Tool

    Right clicking on an instance does nothing now. Now that there are more undos I don't think deleting by right click would be a problem. The tile layer does it that way, and it also has an eraser tool; why not the instance layer. Forcing you to use the keyboard every time you want to remove an...
  5. S

    Infinite instances?!?

    I have an optimization issue: I'm making a game that builds bricks across a line, and when the line is full it destroys them. But when testing the game, I get 10 or so lines in and the game slows massively. In debug it shows that tons of instances of the brick object are still in the game, even...
  6. K

    [SOLVED] Triggering Events

    Hey everyone, I'm fairly new to GML, but I'm not new to programming. I primarily work with Object Oriented Languages, so transitioning into learning GML is sometimes tricky. In short, I have two objects (let's call them objA, and objB). I have objA coded so that when I click on it, it...
  7. W

    Script Particles

    If I have a script with a particle system in it and I've called the burst within an object's step event and there are multiple instances of this object and these instances only get destroyed when they go off of the screen or when space is pressed during a collision, do I need to destroy the...
  8. G

    Find instance that called a script?

    As the title says, I'm wondering if GMS provides a method to return the calling instance of a script. For example, say I have 2 players, and each uses the same generic HP control script. For any call to that script, how can I find out which player object initiated that call? BTW, I'm currently...
  9. J

    Fewer objects or more flexibility?

    Hi, Imagine the pipes in the original Super Mario games. A typical pipe consists of 4 unique sprites, as shown in the image. Pipes of various heights consist of copies of these sprites, also shown in the image. Referring to the image, which one would be better: Flexibility 1. Create 4...
  10. U

    Easiest way to use the room editor?

    I'm going through the Coding Breakout tutorial, and it was a pain adding all those bricks. Let me explain: I could have just left clicked and added all instances of the bricks one-by-one. I probably should have done it that way. However I was thinking this works like most editors, where you...
  11. M

    Legacy GM [Help] Accessing variables from different objects

    NOTE: I am new to the Game Maker language and don't have any noteable experience with sharing variables from different objects and instances! I have the following problem: I have been unsuccesfully trying to access a variable that checks collision from a different object Error I'm...
  12. G

    How to create and iterate through an array of instances? [SOLVED]

    Is it possible to add object instances to an array or perhaps some other way to store a list of instances? I see that I can store enums and other primitive types. I'm working on a block of code that is supposed to return a list of surrounding tiles when given a tile. I was expecting to do...
  13. Z

    Legacy GM Saving instances in room

    Hi, i was wondering what mehtods can you guys reccomend for saving objects in a room, but only for the current gaming sesion, if you start a new game or load a saved game the room to be renewed, somthing like Diablo 2, so overall theyr kept only while you play, if you leave the game the world is...
  14. P

    Legacy GM Spawning Objects in room

    Hello GM Community... The humble bundle finally got me to start on a long-time desire of mine; building a game. I've programmed for years, but nothing in the realm of gaming and, obviously then, never in GML/GM:Studio. My first game I wanted to try and make was a "Sim Tower" like game.. It...
  15. C

    Searching for instances in persistent labeled room

    I have another complicated issue I'd like to resolve simply. Here's my issue: In order to keep the code clean I moved the upgrade system of my game to a different room. Making the rm_play flagged as persistent, when the user presses the 'U' key, I switch to a new room, rm_upgrade. Now, here...
  16. C

    Referencing variables GMZ

    I truly do miss some features of OOP languages. I'm having a problem implementing a modular upgrade system for my game in Game Maker. I have a GUI object "+", and I want to be able to upgrade several aspects of my tower. Ex: max hit points ( soul ), damage, etc. The problem is, I want to...
  17. X

    Legacy GM [Solved] No instance spawning

    Ugh, this has been something I've spent hours on, yet it doesn't seem to work... my initial code was particle-based and it worked. As some might know, I'm making a tank game, where the hull and the turret are seperate entities, the world is physics based and yadayadayada. So, with using...
  18. S

    Interact with instances in any order

    I have treasure chests in my game and I want to be able to open them in any order I want, but the game is only letting me open/interact with them in the order they were created. In other words, I have chests 1, 2, and 3. I should be able to open chest2 first if I want or chest3 first. The...
  19. Heavybrush

    find a specific instance of a parent object

    Hi, I have to find a specific instance of a parent object but I don't know how to do here I have the obj_md_std_solid, it doesn't have a sprite, it is visible and solid after I have a bunch of objects with different sprite for the ground here they have create event ///Starting variables...
  20. Heavybrush

    take object instances

    how to take the instance of the current object created? how to take the previous? how to take all the instance of a specific object? and how to take width and height of the sum of all the instances of an object?
Top