[0.17.33] game.take_screenshot not store file it self from control.lua
Posted: Fri Apr 26, 2019 11:52 am
Hello, i am trying do timelapse video from my replay and iam using that method to add script.on_nth_tick and then game.take_screenshot. But only what is created is my folder what i defined in script in "script-output" folder but no pictures at all.
But when i run same command from console it wokred.
Here is my code what iam putting into control.lua of my replay.
But when i run same command from console it wokred.
Here is my code what iam putting into control.lua of my replay.
Code: Select all
script.on_nth_tick(3600, function(event)
game.take_screenshot{
surface = game.surfaces[1],
position = {50,0},
resolution = {2000,1500},
zoom = 0.25,
path = "timelapse/" .. string.format("%06d" , event.tick/event.nth_tick) .. ".png",
show_entitiy_info = false
}
end)