instances

  1. D

    SOLVED Help with "with statements" and instances

    Hello! I've been struggling a bit on understanding how to manipulate and instance objects on multiple instances of my enemies. Basically i'm trying to create a secondary collision mask that follows them locked to their x, y. if (!instance_exists(obj_M_Collider)) {...
  2. E

    GMS 2.3+ Same object, different messages

    Hello, in the game I'm creating, the player goes in a bedroom where a lot of papers are pinned on the wall, and everyone has a different message written on it. In order to do that, I only created 4 objects, for the 4 sprites (4 different types of papers pinned, to have some variation), but i...
  3. FoxyOfJungle

    SOLVED Click on the TOP depth instance of a layer??

    Hello! I want to click on the instance that is on top of the others, but make the loop only on a specific layer. The function I have works the way it should: The above function is an adaptation of this video. However, if I check objects from another layer, this happens: (The left...
  4. flyinian

    SOLVED How would I get a instance to pass its draw code to a parent and then have that parent send said draw code to all its children?

    I have 1 parent w/ multiple children. I then have one object(obj_DrawCode) that is passing its draw code to the parent. My problem that I am having is that only one child is receiving the draw code. I checked the debugger and it says only one sprite is being drawn. I am trying to draw a...
  5. W

    Destroying a specific instance

    Back for more help. I'm trying to destroy a specific instance, here's the info; There could be many instances of an object. I want to click on one of the objects to bring up a menu. If you click on a destroy button on that menu, you would destroy the instance of the object that was...
  6. E

    Question - Code Instance Create Layer and Possible ID passing issue.

    BACKSTORY: The issue I believe is with my ID, I’m working on an RTS style game, where my spawner lets say a space station spawns units every 3 seconds of a player object “spaceship”. The battlefield has units running around randomly and when they spot a player spaceship and they attack it. I...
  7. paulog

    SOLVED Instances acting differently

    Hello! I'm making a game in GM1.4 but I'm facing some issues. I really hope somene can help me out. In the game some objects have to jump to another position if the player clicks a button. I made two variables, "global.rot" and "global.oldrot". They both have the value of 1 when the room...
  8. P

    Legacy GM [SOLVED] GM Studio 1.4 - Instances Outside of Room Check

    I feel like I have looked everywhere in preferences, but I cannot find where I can disable this check. I *want* my objects outside of the room, and I don't want to accidentally remove them all. Anyone know how to stop this?
  9. Fluury

    Figuring out a point of collision between two bounding boxes

    Heya. Following idea: I'd like to create a particle effect at the point of collision between two bounding boxes. Say you've got yourself a sword attack and your classic enemy, and you want a spark to appear at the location the sword attack hit the enemy - How would you figure this out in a way...
  10. C

    Check small collision_lines for multiple instances

    Hello everyone, Only been using GMS for a little while and having an issue with multiple instances of an object using collision_line(); I have an object that detects if the player object is right below it or right on above it. Either way, when one of these collisions happens, another...
  11. Fluury

    Memory Usage and the amount of Instances.

    Heya! I have lately ran into an interesting "problem" which is making me pretty confused. The project I am working on has level generation, which is creating a lot of instances. Some levels are bigger than others, and thus are more prone to having more instances. One day I realized that the...
  12. flyinian

    SOLVED Pause all but one room?

    I am trying to implement a pause system into my game. The only time I want the game to pause is when the player is on the main menu room. I have numerous persistent objects that are initialized on game start. Could I use instance_deactivate_all(true) and pick and choose which instances don't...
  13. flyinian

    Suggestions on keeping instances in their current states.

    I am making a system that places the instances in a room once clicked either true or false. However, I ran into an issue where once I leave the room it resets the room back to its initial state. which means that the instances have been reset. I discovered that I can use the persistent room check...
  14. FrostyCat

    Asset - Scripts Extended Collision Functions

    Extended Collision Functions Companion scripts for built-in collision functions Overview Extended Collision Functions are enhanced versions of built-in collision functions. You can now easily check for collisions with multiple unrelated objects/instances at a time, and optionally pass in a...
  15. Krenzathal77

    Using "with" to store ID of an object's creator in variable (not working)

    Hi folks, I'm having a problem with storing instance IDs. I have multiple instances of an enemy object that can attack the player with punches/kicks etc. These enemies create hit objects which collide with the player, so obviously I want the hit objects to know which instance is creating them...
  16. otterZ

    GMS 2 Question about Instances and Texture Memory [SOLVED}

    I am interested in how texture memory on a device is influenced by instances using sprites in different ways. I can't quite put into words exactly what I mean here, so here are some example scenarios below . . . Example A) If I were to create an instance that drew a large sprite, let's say for...
  17. Papa Doge

    GMS 2 Planning: Maintaining surface world when entering a dungeon

    Hello, I'm at a critical point in my game's development where I'm starting to get into scaling and performance issues. I've coded myself into a hole so to speak with some previous features that resulted in costly refactors. To learn from my mistakes, I'd like to do better planning before I work...
  18. 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...
  19. Shadowblitz16

    GMS 2 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...
  20. 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...
Top