H
How_To_Do_It?
Guest
I want to know how to destroy previous object if I have the second one. I've tried to do it using instance_id but nothing didn't work. Say in advance, thanks everyone for help :3
instance_number()
, and act accordingly (i.e destroy the duplicates or create an instance if none exists) according to that.instance_id
actually does before using it.I think you will need to be more clear about what you are asking. Give an example of what you are trying to do.I want to know how to destroy previous object if I have the second one. I've tried to do it using instance_id but nothing didn't work. Say in advance, thanks everyone for help :3
Revert order of things in your problem - when clicking button, first destroy all instances of one type (I create a new object with button and if I have more than 1 of these instances I need to destroy the previous object (first created)
instance_destroy(obj_name);
), then create a new one