Page 1 of 1

Impossible to force player to close Remote Control / Map View in LUA script

Posted: Sun Jun 08, 2025 3:20 pm
by GreenFlagCZ
Hello,

Before 2.0 player open the map (M) and if I had cutscene script in my control.lua, the map was automatically closed. This doesnt work right now, because classic map was replaced by remote view. I tryed to use

Code: Select all

player.exit_remote_view()
, but this also doesnt work. Even chatGBT is powerless.

Is there a way how to close player map /remote control in lua script? Thank you.

Re: [2.0.xx] Impossible to force player to close Remote Control / Map View in LUA script

Posted: Sun Jun 08, 2025 7:30 pm
by GreenFlagCZ
Ah, we just solved problem by using

Code: Select all

player.set_controller{ type = defines.controllers.god }
for 1 nanosec. This force player be in "god mode" to close remote view, then he immidietly return to normal state. Also it is possible to do it with teleport player (beware! not a character!).

But these are just workarounds which I am not very happy about...

Re: Impossible to force player to close Remote Control / Map View in LUA script

Posted: Sun Jun 08, 2025 9:56 pm
by Rseding91
I've added LuaPlayer::exit_remote_view() for the next release.