destroy

  1. Masstertron

    instance_destroy() doesn't work on parent objects

    Hi everyone! (GMS 2.3) I've noticed that using instance_destroy() doesn't work for children objects. For example, when I use instance_destroy(obj_enemy), my expectation is that all enemies, including child-object enemies (eg: obj_enemy_bird, obj_enemy_fish) are destroyed. What happens is no...
  2. R

    How can I destroy an object when it collides

    ¿Cómo puedo hacer que cuando la bala golpee el bloque se destruya automáticamente en Game Maker Studio 2?
  3. anjai

    Windows SOLVED // how do I respawn an object on the place it got destroyed?

    I tried to find it out myself but all of the tutorials explain how to randomly respawn after some time and I need my object to respawn on the exact same place it got destroyed and just after it got destroyed and not at a certain amount of time :) If someone could tell me how to do it or where to...
  4. 2

    Leaving Persistent Room: Do Destroy and Room End Events Trigger?

    When the player leaves a persistent room for another (pause menu in my case) does the room end event trigger, or the instance destroy event trigger? These events currently destroy ds_grids in some of my objects, and that would break the room if I return to it (by unpausing)?
  5. M

    Destroy ds_grid / map / list, even if they are local?

    Hi There Just short question. It's not that clear in the GM Help. If i have a local ds_grid like this: var grid = ds_grid_create(...) Do I have to destroy it after use as well? Thanks a lot! kind regards mX273
  6. JapanGamer29

    GMS 2 Does destroying a data structure destroy data structures within it?

    The manual says that destroying a data structure removes all values that it contains, but does that include other data structures? If, for example, I have a stack of maps, does ds_stack_destroy() remove all those maps, too? My memory usage grows with every room_restart() so I'm trying to...
  7. JapanGamer29

    GMS 2 Need help destroying data structures

    Hello. Sad to say that I haven't been destroying my data structures, and now that I'm going back through my code to do so, I'm getting all kinds of "index does not exist" errors. I just need to clear up the confusion in my head about how to do this properly. From the manual, I understand that...
  8. KaitoBrando

    SOLVED GameMaker2 (alarm[0]) Destroy Object

    Hello I am new to creating games and I am making a weapon system in which it is destroyed after a certain time. But I put an alarm[0] = with the command instance_destroy () more if I put alarm[0] = 1 the bullet is simply destroyed at the same time and if I put alarm[0] = 2 it is not destroyed...
  9. P

    SOLVED "I32 argument is array

    Hello this is my first post on this website. I've been trying to make a functional saving system but when I try to destroy the "wrapper" this error shows up. Here is my code: var root = ds_list_create(); with(obj_psvng) { var map = ds_map_create(); ds_list_add(root,map)...
  10. Carloskhard

    GML Variable references invalid object (-4)

    So I have this code in an object which tries to destroy other object when it collides with it. The code is the following("colliding" is a local variable): with (colliding){ show_debug_message(colliding) instance_destroy(); } and in the debug I can see the ID of the object is correct,but...
  11. flyinian

    (solved)Using Tile Based Collision for base building

    I was originally going to use objects for collision and I had a safe assumption that I could do base building with that. However, I decided to go with tile collision and now i am concerned that using the tile and tile collisions won't do well with base building and destructible...
  12. oldnoob

    [SOLVED] Help with destroying an instance

    Hello there, Platformer question: I'm having trouble destroying an instance of an object my player is sanding on.The sprite connected to the obj_blockcollapse has 9 frames of animation and the object's create event sets both the image_index and image_speed to 0. The code in my player's step...
  13. FacesOfMu

    Objects that reference other objects that have since been destroyed

    Trying to find out what problems arise in the following scenario: Object1 Object2.pointing = Object1 instance_destroy(Object1) So what is in Object2.pointing now?
  14. H

    When should I destroy a list?

    I'm confused about when I should destroy the list? Do I need to do it everytime I change to a new room? or when the object is no longer needed?
  15. EZTALES

    Legacy GM ISSUE WITH DESTROYING OBJECT IN NEXT ROOM.

    hey yall. just having a small issue with destroying an object in the next room, im using a level system so when you reach a certain level, some things are deleted. heres the code. and yes the room uses physics. /// room end with (obj_player_stats) { if level = 2 { audio_stop_sound(sad_snowfall)...
  16. B

    Legacy GM Tetris destroy completed row, need help

    I have basically a tetris like clone and I convert the blocks into 50x50 objects I call "obj_solid". I need to check these rows if they are all filled and delete them all...I have followed an online tutorial and it didn't help....it basically has me jumping to a position and check each one and...
  17. S

    GMS 2 destroy a tile with collision

    hello. i want to destroy a tile which have collision with special object (like a bullet) is this possible with GML and how? thanks a lot
  18. XirmiX

    GML [Solved] Iterations problem

    100 - 15 = -140 ? Well, that's what game maker thinks anyway. I have a game where a projectile is colliding with the tank that launched it (the player). The projectile bounces off the wall and hits the tank after being shot in a way that lines it up with the player's tank. I have a variable...
  19. P

    GMS 2 Does deleting a data structure full of data structures delete all the data structures with in it?

    Does deleting a data structure full of data structures delete all the data structures with in it?
  20. A

    Pause Between Teleports, Should Player Destroy/Respawn?

    I have everything working for a pretty dramatic type of bells and whistles n fireworks teleportation feature going on ..if i do say so myself... so it's not (game-time) instantaneous.. .like you don't touch one pad and appear on the next instantly.. there's time and animation involved, not to...
Top