Called when an entity dies.
Contains
entity :: LuaEntity
cause :: LuaEntity (optional): The entity that did the killing if available.
force :: LuaForce (optional): The force that did the killing if any.
Search found 947 matches
- Sat Jul 08, 2017 5:20 pm
- Forum: Modding help
- Topic: [Resolved] Who Killed the Biter...
- Replies: 6
- Views: 2181
Re: Who Killed the Biter...
on_entity_died
- Fri Jul 07, 2017 6:35 pm
- Forum: News
- Topic: Friday Facts #198 - Rail segment visualisation
- Replies: 116
- Views: 67804
Re: Friday Facts #198 - Rail segment visualisation
If two nodes with the same color end up next to each other, you could simply add an edge between them and still have a planar graph, no?pleegwat wrote:Yes, but you may want to colour all those 2's as if they're adjacent for clarity. And such preferences may lead to non-planar problems which aren't 4-colourable.
- Fri Jul 07, 2017 5:54 pm
- Forum: News
- Topic: Friday Facts #198 - Rail segment visualisation
- Replies: 116
- Views: 67804
Re: Friday Facts #198 - Rail segment visualisation
y.petremann wrote:Proof of concept of what I've said :
Here their is two magenta part connected together
- Thu Jul 06, 2017 5:09 pm
- Forum: Technical Help
- Topic: Cannot lock items in quickbar
- Replies: 2
- Views: 1297
Re: Cannot lock items in quickbar
Version 0.15.24
Maybe this is related.Changes
- Changed default keybind for toggle filters on macOS to Command + Right Click (50253)
- Mon Jun 26, 2017 6:46 pm
- Forum: Modding discussion
- Topic: Invoking a Lua command on startup?
- Replies: 6
- Views: 2677
Re: Invoking a Lua command on startup?
Code: Select all
17.687 Received SIGTERM, shutting down
17.789 Goodbye
- Fri Jun 23, 2017 9:14 pm
- Forum: Modding discussion
- Topic: Invoking a Lua command on startup?
- Replies: 6
- Views: 2677
Re: Invoking a Lua command on startup?
print("screenshot done"), listen for that string with a script, kill the process.
- Fri Jun 23, 2017 7:19 pm
- Forum: Technical Help
- Topic: Standart Forces Name Change?
- Replies: 8
- Views: 3022
Re: Standart Forces Name Change?
What makes you think the buildings belong to two forces at the same time?
- Fri Jun 23, 2017 6:38 pm
- Forum: Technical Help
- Topic: Standart Forces Name Change?
- Replies: 8
- Views: 3022
Re: Standart Forces Name Change?
Could you rephrase that question? What did you do already, what are you trying to achieve exactly?
- Thu Jun 22, 2017 5:07 pm
- Forum: Technical Help
- Topic: Standart Forces Name Change?
- Replies: 8
- Views: 3022
Re: Standart Forces Name Change?
Code: Select all
/c for _, entity in pairs(game.player.surface.find_entities_filtered{force="player"}) do entity.force="new-force" end
- Tue Jun 20, 2017 9:36 pm
- Forum: Modding help
- Topic: Flamethrower turret ammo
- Replies: 1
- Views: 702
Re: Flamethrower turret ammo
Code: Select all
table.insert(data.raw["fluid-turret"]["flamethrower-turret"].attack_parameters.fluids, {type="water", damage_modifier=20})
- Tue Jun 20, 2017 4:48 pm
- Forum: Modding help
- Topic: Fluid registration
- Replies: 4
- Views: 1344
Re: Fluid registration
Look at how the base mod defines fluid prototypes and add the missing keys and units.
- Mon Jun 12, 2017 6:14 pm
- Forum: Modding help
- Topic: Error in assign ID
- Replies: 14
- Views: 14930
Re: Error in assign ID
This fill-barrel thing now seems to happen when you used to have Factorio 0.15 installed which for some reason got downgraded to 0.14 again, leaving around some files of the newer version. Either update to 0.15 again or remove the Factorio directory to get rid of the extraneous files, then reinstall...
- Fri Jun 09, 2017 4:45 pm
- Forum: Modding help
- Topic: negative Pollution, Evo Factor
- Replies: 4
- Views: 1667
Re: negative Pollution, Evo Factor
fns = { function() game.surfaces.nauvis.pollute({0,0}, -1e7) end, function() print(game.forces.enemy.evolution_factor) end, function() game.surfaces.nauvis.pollute({0,0}, -1e7) end, function() print(game.forces.enemy.evolution_factor) end, function() game.surfaces.nauvis.pollute({0,0}, -1e7) end, f...
- Fri Jun 02, 2017 4:19 pm
- Forum: Technical Help
- Topic: Command to pick up all items on floor
- Replies: 7
- Views: 8234
Re: Command to pick up all items on floor
Code: Select all
for _, entity in pairs(game.player.surface.find_entities_filtered{type="item-entity", name="item-on-ground"}) do
game.player.insert(entity.stack)
entity.destroy()
end
- Fri May 26, 2017 7:18 pm
- Forum: Modding help
- Topic: Question about on_player_selected_area
- Replies: 2
- Views: 817
Re: Question about on_player_selected_area
Does the selection-tool's selection_mode contain "any-tile"?
- Fri May 26, 2017 4:18 pm
- Forum: Modding help
- Topic: How to know that a laboratory is working?
- Replies: 4
- Views: 1162
Re: How to know that a laboratory is working?
inventory = game.player.selected.get_inventory(defines.inventory.lab_input) script.on_event(defines.events.on_tick, function(event) print("tick " .. game.tick) for i = 1, 7 do local item = inventory[i] if item.valid_for_read then print(item.name .. ": " .. item.durability) end e...
- Fri May 26, 2017 3:58 pm
- Forum: Gameplay Help
- Topic: How do you enable the task list?
- Replies: 3
- Views: 1894
Re: How do you enable the task list?
You can put your custom fun code snippets into the save game's control.lua.
- Thu May 25, 2017 3:24 pm
- Forum: Modding help
- Topic: How to know that a laboratory is working?
- Replies: 4
- Views: 1162
Re: How to know that a laboratory is working?
Also not the most elegant way imaginable, but in line with what you're already doing there: maybe you could have a look at lab.get_inventory(defines.inventory.lab_input)[1 ... 7].durability and see if that changes over time.
- Sat May 20, 2017 4:45 pm
- Forum: This Forum
- Topic: code: select all jumps to top of page
- Replies: 6
- Views: 2297
Re: code: select all jumps to top of page
Huh, okay, it's still working fine in Firefox 45, it's broken in 53.
- Sat May 20, 2017 2:38 pm
- Forum: This Forum
- Topic: code: select all jumps to top of page
- Replies: 6
- Views: 2297
Re: code: select all jumps to top of page
Allow factorio.com in NoScript.