What event fires when player explode cliff?
Posted: Mon Aug 03, 2020 7:09 am
I can't find it from API site.
I can't find it anyone asking about that on this forum.
I can't find it anyone asking about that on this forum.
www.factorio.com
https://forums.factorio.com/
Code: Select all
/c
local rev = function(a,b) for k,v in pairs(a) do b[v]=k end return b end
local del = function(a,b) for _,k in pairs(a) do b[k]=nil end return b end
local nam = rev(del({'on_tick','on_chunk_generated'},defines.events),{})
script.on_event(rev(nam,{}),function(e) game.print(e.tick..': '..nam[e.name]) end)
thanks! this code is so useful, but unfortunately i couldn't found any events but only on_player_used_capsule fires.eradicator wrote: Mon Aug 03, 2020 3:23 pm When i'm unsure what events are firing i just have them printed to console:Code: Select all
/c local rev = function(a,b) for k,v in pairs(a) do b[v]=k end return b end local del = function(a,b) for _,k in pairs(a) do b[k]=nil end return b end local nam = rev(del({'on_tick','on_chunk_generated'},defines.events),{}) script.on_event(rev(nam,{}),function(e) game.print(e.tick..': '..nam[e.name]) end)
Looks like there is no event for cliffs exploding.
Keep in mind that robots can blow up cliffs as well.x2605 wrote: Sat Aug 22, 2020 2:11 pm
thanks! this code is so useful, but unfortunately i couldn't found any events but only on_player_used_capsule fires.
may be cliffs affected by throwing can be determined by combining some informations...
Code: Select all
data.raw.capsule[„cliff-explosives“].robot_action.action_delivery.target_effects = ...
Code: Select all
data.raw.projectile[„cliff-explosives“].action.action_delivery.target_effects = ...