[posila] [0.17.59] Fog of war does not work
[posila] [0.17.59] Fog of war does not work
Only extracting raw materials from smelting furnaces of another force should be invisible.
Last edited by XaLpHa89 on Tue Jul 30, 2019 10:38 pm, edited 1 time in total.
Re: [posila] [0.17.59] Fog of war does not work
Thanks for the report.
I think the inventory update notifications should not be visible to enemy forces at all, so I did that for 0.17.61
I think the inventory update notifications should not be visible to enemy forces at all, so I did that for 0.17.61
Re: [posila] [0.17.59] Fog of war does not work
I have the same problem with drawings. Or did I program it wrong?
Code: Select all
-- /silent-command circle_add( game.players[ 1 ] )
-- /silent-command circle_change( game.players[ 1 ] )
-- /silent-command circle_remove( game.players[ 1 ] )
function initialize_forces()
game.create_force( 'force_player_one' )
game.create_force( 'force_player_two' )
end
local table_of_colors = { squad = { r = 75, g = 155, b = 45 }, team = { r = 65, g = 120, b = 200 }, enemy = { r = 190, g = 55, b = 50 }, neutral = { r = 77, g = 77, b = 77 }, damage = { r = 255, g = 0, b = 255 }, white = { r = 255, g = 255, b = 255 } }
function circle_add( player )
player.force = game.forces.force_player_one
if global.table_of_circles == nil then global.table_of_circles = {} end
if global.table_of_circles[ player.index ] == nil then
-- local one = rendering.draw_circle( { target = player.character, target_offset = { x = 0, y = - 2.5 }, force = game.forces.force_player_one, surface = player.surface, color = table_of_colors.team, radius = 0.2, filled = true, only_in_alt_mode = false } )
-- local two = rendering.draw_circle( { target = player.character, target_offset = { x = 1, y = - 2.5 }, force = game.forces.force_player_two, surface = player.surface, color = table_of_colors.enemy, radius = 0.2, filled = true, only_in_alt_mode = false } )
local one = rendering.draw_circle( { target = player.position, force = game.forces.force_player_one, surface = player.surface, color = table_of_colors.team, radius = 3, filled = true, only_in_alt_mode = false } )
local two = rendering.draw_circle( { target = { x = player.position.x + 80, y = player.position.y }, force = game.forces.force_player_two, surface = player.surface, color = table_of_colors.enemy, radius = 3, filled = true, only_in_alt_mode = false } )
global.table_of_circles[ player.index ] = { one = one, two = two }
end
end
function circle_change( player )
if global.table_of_circles[ player.index ] ~= nil then
local one = global.table_of_circles[ player.index ].one
local two = global.table_of_circles[ player.index ].two
end
end
function circle_remove( player )
if global.table_of_circles[ player.index ] ~= nil then
rendering.destroy( global.table_of_circles[ player.index ].one )
rendering.destroy( global.table_of_circles[ player.index ].two )
global.table_of_circles[ player.index ] = nil
end
end
Re: [posila] [0.17.59] Fog of war does not work
The lua rendering API pays no attention to fogg of war. It just draws on the screen at all times.
If you want to get ahold of me I'm almost always on Discord.
Re: [posila] [0.17.59] Fog of war does not work
I want to portray friend and foe somehow. For example Symbolized with a colored circle. Does anyone have an idea how else to do it?