[GM] How to destroy instance from another instance
Uploader Comments (Wizirdi)
All Comments (11)
-
Hi i like your videos, this is very useful and i hope u will continue ;)
-
OK so I did this and now it actually destroys itself
-
-
By "set the object to other", I mean in the collision event for the object that is colliding with the grass, execute the event and set the part that says "self, other, object" to "other".
-
When using collisions, set the object to other. That will effect only the grass where the collision is occurring. As for destroying one instance, go to the left pressed event.
-
So pressing the spacebar in this is like the hat guy says "Move!B!tch!Get outta the way!Get outta the way!Get outta the way!" lol
-
I was wondering.. Do you know how to destroy only ONE instance when you click on it? For example: I have 3 enemies, all named enemy1. If I click on enemy1 he destroys himself. But the problem is I only want One of them to die, but the All die.
Can you make a tutorial showing how to destroy One instance?
Thanks!
-
You know when step on grass, the grass get's "compressed". That's what I want but when I code everything, and jump on the grass, all the grass on the level get smushed, even though I only stepped on one grass object... If you want, I can make a video out of it.
-
@HeteroProductions I was just about to ask the same thing :P
Ok, I see you like a GM God of the sort, so I was just wondering... how do you make it so that if you left click on an object, I destroy THAT specific object. Or... this is what I'm doing in my game... I want to have a vspeed collision with grass so that it smushes, I coded everything but when I do it, ALL the grass goes smushed.
HeteroProductions 1 year ago
@HeteroProductions I'm very confused. To make an instance destroy when you click it, just make a left pressed event in the object you want to destroy then put in instance_destroy(); What do you mean by smushed?
Wizirdi 1 year ago