Heya,
I have a create entity trigger effect that is the result of an enemy attack. It creates an entity where the attack hits.
However, this has a side effect of removing any player ghosts that happen to be on that location.
I'm using the two properties, which I thought may take ghosts into account but with no luck (I still need them so they create the entity around the location if it fails (e.g, hitting a big bunch of walls/turrets).
check_buildability = true,
find_non_colliding_position = true,
Am I missing something here? Or is this one to mark up as a modding interface request/bug?
Cheers
[Solved] Does create-entity trigger effect take ghosts into account?
[Solved] Does create-entity trigger effect take ghosts into account?
Last edited by Fishbus on Tue Jul 08, 2025 8:01 pm, edited 1 time in total.
Re: Does create-entity trigger effect take ghosts into account?
By default, creating entites removes colliding ghosts. In some places like LuaSurface.create_entity() there is an option to disable this behaviour, but seems like there isn't on the trigger effect
Re: Does create-entity trigger effect take ghosts into account?
Darn, I was hoping it'd all be on a trigger effect as I don't want to over rely on control stuff.
Unfortunately you can't even use the layer="ghost" as from looking at it, this is only the check for the initial test, but not the outward radius of re-checks.
Unfortunately you can't even use the layer="ghost" as from looking at it, this is only the check for the initial test, but not the outward radius of re-checks.
Re: Does create-entity trigger effect take ghosts into account?
I have had help to solve this
The fix was that the created entity should have its collision mask customised/changed to include the ghost layer.
The fix was that the created entity should have its collision mask customised/changed to include the ghost layer.
Code: Select all
collision_mask = {layers={item=true, meltable=true, object=true, player=true, water_tile=true, is_object=true, is_lower_object=true, ghost=true}},