Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
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
If you mean having a singleton, you can just check if more than one exists with instance_number(), and act accordingly (i.e destroy the duplicates or create an instance if none exists) according to that.
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 (instance_destroy(obj_name);), then create a new one