Createntity/mine issue
Posted: Thu Apr 18, 2013 5:11 am
anyone care to explain why this does not work as expected
Should be fairly obvious that I created a new mine that is suppose to deploy regular land-mines around it when it explodes...only issues are that it only works if the creepers hit it before 'setting' and then when it does work the newly spawned mines seem to be on the enemy's force (ie, they become invisible and if you walk over where they were they explode
)

Code: Select all
game.onevent(defines.events.onentitydied, function(event)
if event.entity.name == "trigger-mine" then
game.createentity{name="land-mine",position={event.entity.position.x,event.entity.position.y-1},force=player}
game.createentity{name="land-mine",position={event.entity.position.x,event.entity.position.y+1},force=player}
game.createentity{name="land-mine",position={event.entity.position.x-1,event.entity.position.y},force=player}
game.createentity{name="land-mine",position={event.entity.position.x+1,event.entity.position.y},force=player}
end
end
)
