My first thought was to make my achievement of type "dont-build-entity-achievement" based off a special hidden entity (type "simple-entity-with-owner") and then spawn that entity on player death. I believe the hidden entity spawning is working, but spawning through LuaSurface.create_entity doesn't appear to count as "building" for purposes of disabling the achievement.
My spawning code:
Code: Select all
...
game.surfaces.nauvis.create_entity({
name = "hidden-grave-marker",
amount = 1,
position = {player.position.x, player.position.y},
force = game.forces.player
})
Is there another way I can create an achievement that players can "fail" while reflecting the failed state in the achievement UI?