Page 1 of 1

Event(s) when a manually placed entity replaces a ghost

Posted: Sun May 21, 2017 6:11 pm
by sparr
I want to detect when an entity is being placed that will destroy a ghost, and get info about the ghost before it disappears. Either of these two events would be useful, or some other equivalent functionality:

on_ghost_removed would let me save the info about the ghost as it was being removed, before the new entity's on_built_entity fired. this event would also be useful when the player manually right clicks a ghost.

on_pre_built_entity would let me search the area for existing entities, including entity-ghost. this event would also be useful for a lot of other mods that affect building of things.

Use case: I am trying to write a mod that lets players manually place entities on top of matching ghosts and get all the ghost's settings/orientation/etc copied to the new entity.