• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - IDE Delete underlying object option in room editor?

S

Scoremonger

Guest
Hi, I was doing a tutorial based on GMS 1.4 and it used a room editor option to delete underlying objects to avoid winding up with stacks of the same object without realizing it. I gather this feature was removed from GMS2's room editor, but is there a new automatic way to prevent stacking objects? It is still fairly easy to accidentally stack them when using alt+LMB to place lots of instances at once, for example. I saw a comment on some forum that the new layer system negates the need for this feature, but I'm not sure how. Am I missing something? Thanks!
 
E

Edmanbosch

Guest
Hi, I was doing a tutorial based on GMS 1.4 and it used a room editor option to delete underlying objects to avoid winding up with stacks of the same object without realizing it. I gather this feature was removed from GMS2's room editor, but is there a new automatic way to prevent stacking objects? It is still fairly easy to accidentally stack them when using alt+LMB to place lots of instances at once, for example. I saw a comment on some forum that the new layer system negates the need for this feature, but I'm not sure how. Am I missing something? Thanks!
You can just put this in the create event of the object you are mass-producing.
Code:
if (place_meeting(x, y, object)) instance_destroy();
 
Top