instances

  1. 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...
  2. 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...
  3. 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...
  4. 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?
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. Rowan

    GMS 2 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...
  18. qbot21

    GMS 2 [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...
  19. Justin Sousa

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