Page 2 of 2

Re: Map editor instant deconstruction should raise events

Posted: Wed Aug 28, 2019 10:31 pm
by eradicator
Raiguard wrote:
Wed Aug 28, 2019 7:15 pm
I already tried requesting this capability separately, Rseding shot me down quicker than a drone flying over Area 51, similar to how this thread was immediately dismissed at first.
Well, then why don't you try to throw more arguments at your original thread instead of leaking into this one? If i was a moderator i'd have merged them back already :p.

code

Re: Map editor instant deconstruction should raise events

Posted: Mon Feb 05, 2024 10:58 am
by Bilka
DaveMcW wrote: 2. Enter map editor
3. Make sure Settings -> Instant deconstruction is on.
4. Select Tools -> None.
5. Pick up a deconstruction planner and deconstruct something.
Just to make this clear for anyone coming across this thread: The script_raised_destroy event was only added for the case of instant deconstruction via using a deconstruction planner in the map editor, quoted above.

Destroying an entity by using the "entity" tab in the map editor and "mining" it does NOT raise an event by default (as of writing this post). If you want to be notified of an entity being destroyed via the map editor entity tab, register it for the on_entity_destroyed and listen to the event. This event is raised for any kind of entity destruction (once registered for the entity), including but not limited to using the entity tab in the map editor, chunks or surfaces being removed, or just plain old things like a player mining the entity.