[Rseding91] [2.0.18] GUI not visible when opened by script in non-hosting clients
Posted: Sat Nov 16, 2024 3:51 am
This is technically a modded game but I think that maybe is exposing a bug.
I have a mod that basically uses a keyboard shortcut for opening entities, the control.lua is like this:
The shortcut is the "F" key. In normal gameplay and as a host it works as expected, however it doesn't for non-hosting clients, it seems like the GUI opens but is invisible:
Because it only happens with non-hosting clients maybe is an issue with the latency hiding system? I know that in Factorio 1.1 this worked. A minimal mod is attached.
I have a mod that basically uses a keyboard shortcut for opening entities, the control.lua is like this:
Code: Select all
local function onKey(event)
local player = game.get_player(event.player_index)
local entity = player.selected
if entity and entity.valid then
player.opened = entity
end
end
script.on_event("test-keybind", onKey)
Because it only happens with non-hosting clients maybe is an issue with the latency hiding system? I know that in Factorio 1.1 this worked. A minimal mod is attached.