is_valid or is_blueprint filter for on_built_entity
Posted: Mon Jun 29, 2026 11:24 pm
I'm working on a mod that automatically replaces a certain ghost (specifically, landfill) with another when the ghost is placed. However I've noticed that when positioning large blueprints, a large amount of lag is incurred as, apparently, the on_built_entity event is called each frame (???).
Even if I check is_valid as the first statement of my event (which does filter them out), it still creates a big slowdown from the sheer number of lua function calls.
So, I'd like to request a way to filter out these "false" ghosts on the C++ side. A filter such as "is-valid" or "attached-to-cursor" or some such.
Thanks for the consideration.
Even if I check is_valid as the first statement of my event (which does filter them out), it still creates a big slowdown from the sheer number of lua function calls.
So, I'd like to request a way to filter out these "false" ghosts on the C++ side. A filter such as "is-valid" or "attached-to-cursor" or some such.
Thanks for the consideration.