instance

  1. Anomaly

    true false for bullet instances

    Hi guys, Lil "ammo issue" here... Where / what would be the best method to store a true/false state of one bullet of thousands? (This means for every instance, ever created) I have a basic setup for it and it works, but they're moving SO fast and registering at their target properly Buuutt...
  2. Anomaly

    Child Instance Destroy When Parent Instance Destroyed?

    I'm working on a new project idea with a limited number of instances off an object at any given time (3). Each of those have 1 separate object instance that they create. All these pairs are the same. So there's 3 pairs of object instances "allowed" No more than 3 pairs can be existing. Some...
  3. A

    Problem With " Instance_Create_Layer "

    Hello, I have a problem ... After firing my pseudo-game, the code error pops up.
  4. kaerpaenen

    Help with regional activation/deactivation

    I'm trying to deactivate my objects outside the screen, and activate them just before they appear. I am using instance_activate_region(view_xview, view_yview, view_wview, view_hview, true); which is working except for my trees. My trees are 64 pixels tall, 32 wide and whenever I move down (top...
  5. H

    too many instances of one object

    i realized that one of my object is created more then one time. can i make an if sentence where it checks how many instances of this object are active and destroy every instances above the one.
  6. J

    Trouble with post-draw instance destroy

    I have coded for a hitbox to be created when the player is attacking like so: // Hitbox if (image_index >=0) && (image_index <1) { with(instance_create_depth(x,y,0,obj_hitbox)) { image_xscale = other.image_xscale; with...
  7. Y

    Legacy GM double collision (SOLVED)

    Every enemy in my game has a hitbox (this is an different object as the hitbox is different from the actuall mask_index of the enemy) but when I inflict damage this goes to every enemy in the room. here is the code Player object ///Hitbox if(Is_Attacking = 1){ if(image_index >= 7 &&...
  8. T

    Set up a variable and then increase its value for each instance...

    Hello, is there a way to do that? For example, I have 300 instances of one object, and I want each instance to have a value (starting from 1) that increases for each single one. Is that possible?
  9. S

    Check if id of instances is a certain object

    I want to check if my oPlayer instance can see another instance (oInputable), without beeing blocked by all other instances, grouped under the object oNotInputable. Both of these objects are children of the oSolid object that makes them all solid for the Player. To check this collision I use the...
  10. B

    Legacy GM Refer the Instance ID of the object calling code?[Solved]

    Good morning, afternoon, evening wherever you are, today, I want to ask you something pretty simple to all of you, about Instance ID. I have known that there are 2 built-in variables for referring the Instance ID, which are object_index and id. However, after creating a variable and store the...
  11. M

    Problem when grabbing several items

    Hey everybody. My skills with game maker have been improving considerably, but I still have some doubts and I'll be very grateful if you help me. I've want to create items with which the player can "call" special strikes against the enemy. For example, the first item I made is for calling a...
  12. C

    GMS 2 Add Instance to Layer

    Hello, I'm trying to have the player object remain on a layer that has the same name throughout all rooms in the game. When I start the game, I do receive an id number when debugging and the same is true when I change rooms. However, when I go back to the original room, the game freezes when I...
  13. H

    i want an instance create at at specific position.

    i have a game. if you know the Game, Don't touch the white tiles. The objects in the game are moving are like this. At first i had an alarm timer to spawn the objects, but when it gets faster the timer ist to slow, sooo. i need an idea, for example. i want, that if the objects in the middle...
  14. FrostyCat

    What's the Difference: Objects and Instances

    What's the difference: Objects and Instances GM Version: N/A Target Platform: All Download: N/A Links: N/A Introduction At least a dozen times a week, I see questions on the Q&A section that have to do with people not distinguishing objects from instances. This topic aims to explain the...
  15. L

    Instance destroy with mouse button release

    Hi, I've been trying to write a piece of code that would destroy an instance with mouse button release. I tried the below, but it wouldn't work - none visible action is performed: if (mouse_check_button_released(mb_left) && position_meeting(mouse_x, mouse_y, id)) { instance_destroy(); }...
  16. Shadowblitz16

    GMS 2 (Solved) activate and deactivate instance by id

    does anybody know how to deactivate and activate a instance by id? /// @description Insert description here // You can write your code in this editor event_inherited() var dx1 = screen_y; var dy1 = screen_x; var dx2 = screen_y+screen_height/16; var dy2 = screen_x+screen_width/16; for (var...
  17. Shadowblitz16

    GMS 2 (Solved)Gamemaker throws a error on line that doesn't make sense.

    does anybody know why gamemaker is throwing this error.. ERROR!!! :: ############################################################################################ FATAL ERROR in action number 1 of Draw Event for object W_View_Screen: Unable to find any instance for object index '2' name...
  18. R

    GML Creating variables for copied instances

    Hi everyone! Let's say I have an object in my room. Then, through some way, I copy this object, creating a new instance of it. I can keep copying it if I want, ending up with multiple instances of that object. What I would like to know is, if it's possible to address a new variable to the...
  19. P

    Pathing Question

    When creating an instance of an object from another object (e.g. new_instance=instance_create(x,y,new_object) how would you also set a path for that other object without setting the path within code of the other object? Also, when using paths for movement how can you change animation based on...
  20. J

    Windows Global test????

    I have set this in a script: global.point =0; and in another script: global.point +=5; but I cant seem to figure out how to test this variable :( I have tried a few things but I just keep getting errors. I want to test this variable so that i can delete an instance of an object but can't...
Top