Page 1 of 1

Read access for createdByCorpse on entity ghosts

Posted: Mon Nov 04, 2024 12:37 pm
by Cooldude2606
I want to be able to get all entity ghosts in an area that were created by an entity being destroyed and not from a blueprint or other player created ghost. In 1.1 I would use "ghost.time_to_live ~= 4294967295" to test if the ghost would expire; ghosts no longer expire in 2.0 so I can not use this logic.

In game when an entity is destroyed it will create a ghost that renders as a marker, at first I thought I could test if there was a ghost and remnant in the same position but this same setup could be created by a player so was not useful. I asked around and was informed that "createdByCorpse" exists internally and is used to indicate that it should be drawn as a marker. I would like read access to this property, my use case only requires a boolean but others may want the reference to the corpse entity.

(It would be great if it chould also be an EntitySearchFilter to reduce iteration on the lua side, but that sounds complex for this limited use case)