I'm trying to create a "Small Alien Artifact" when an unit dies.
However, the Small Alien Artifact is an "Item" and not an "Entity"
So I can't create it and add it to a table, using the below:
Code: Select all
local worm_larva = surface.create_entity({
name = "alien-artifact",
position = entity.position,
force = game.forces.enemy
})
global.small_alien_artifact_created[entity.unit_number] = {
artifact = entity,
time = event.tick
}
Thanks.