Page 1 of 1

[1.1.104] LuaGameScript::is_multiplayer() is false on_init

Posted: Thu Mar 28, 2024 7:16 pm
by Gerkiz
Hello,

When starting a new multiplayer save and having the following code below:

Code: Select all

script.on_init(
    function()
        log(game.is_multiplayer())
    end
)
It seems that game.is_multiplayer() when run is always false on event on_init.

I expect for it to return true if the game is multiplayer. Is this correct?

Kind regards,
Gerkiz

Re: [1.1.104] LuaGameScript::is_multiplayer() is false on_init

Posted: Thu Mar 28, 2024 7:24 pm
by Rseding91
Thanks for the report. Because of how that value works and because it can switch between single player and multiplayer it takes 1 or more updates after a save is loaded before the live value is populated.