I want to run some checks on_pre_build and, if a check fails, I want to cancel the placement of the item. Is this possible?
I'd rather avoid shenanigans like "the next on_built_entity event should destroy the entity" but that's totally an option if there's no cleaner way.
Prevent pre_build from succeeding
Re: Prevent pre_build from succeeding
I should really test before posting XD
If you change the contents of the player's cursor during this event, then you change what gets built. So in my case...
This cancels the build event. Of course it also clears the cursor but in my use-case that's acceptable.
If you change the contents of the player's cursor during this event, then you change what gets built. So in my case...
Code: Select all
game.players[event.player_index].clear_cursor()