Jump to content

Help! I need to delete a bunch of objects under mouse!


Loscil2

Recommended Posts

AuGrGfi.jpg

 

How can I delete a bunch of entities under my mouse?

 

I tried TheInput:GetAllEntitiesUnderMouse():Remove() but didn't work.

 

I ask this because I really need to delete a lot of objects that spawned in the same spot. TheInput:GetEntityUnderMouse:Remove() is not enough to delete them all, lag issues make said command really tiring because opening the console can take so much time...

I thought this would be the best place to ask, thanks in advance.

Link to comment
Share on other sites

It's TheInput:GetWorldEnitityUnderMouse():Remove()

 

EDIT: Just out of curiousity, may I ask how that happened?

 

I have More Realistic Beehives and for some unknown reason, a beehive spawned in the ocean. At first I didn't take much importance but as now, in the day 219, the lag is unbearable. Since the mod makes beehives to reproduce like, say, cells, you can imagine the sheer amount of lag that accumulated after so many days.

 

Yes, I tried TheInput:GetWorldEntityUnderMouse():Remove() but it only removes one beehive at the time and I can't see the difference.

Link to comment
Share on other sites

Alternatively, you could type DebugSpawn("NAME") to put something there to solve the problem for you, say one-eye dan aka deerclops.

 

Before you use monsters and such, I recommend trying DebugSpawn("gunpowder").components.explosive:OnIgnite()

The ash will blow away soon after...

Link to comment
Share on other sites

Alternatively, you could type DebugSpawn("NAME") to put something there to solve the problem for you, say one-eye dan aka deerclops.

 

Before you use monsters and such, I recommend trying DebugSpawn("gunpowder").components.explosive:OnIgnite()

The ash will blow away soon after...

 

Well, I won't know if this works because the most easy way to get rid of them was to move to another world.

Anyways, when I tried to burn them it caused so much lag that the game froze and crashed. So yeah...

 

Thanks for replying, though.

Link to comment
Share on other sites

Well, I won't know if this works because the most easy way to get rid of them was to move to another world.

Anyways, when I tried to burn them it caused so much lag that the game froze and crashed. So yeah...

 

Thanks for replying, though.

 

If removing all of them at once hangs/crashes, you could try deleting them in chunks instead:

 

for i=1,50 do TheInput:GetWorldEntityUnderMouse():Remove() end
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...