API:IsPlayerInitialized
From RoR Wiki
UI Lua API · Game functions
Version: WAR 1.4.8
Returns whether the local player has been fully initialized.
initialized = IsPlayerInitialized()
Arguments
None.
Returns
- initialized
boolean–trueonce the local player object exists and the client has marked it as loaded into the world;falseotherwise.
Details
- Before the local player object exists (for example in the pregame screens) the function returns
false. - The stock UI uses it to ignore data updates that arrive while the player is still being set up.
Errors
None.
Example
From easystem_utils/source/player.lua:
local playerInitialized = IsPlayerInitialized ()
if (playerInitialized == false) then
Player.previousMoney = nil
end
From ea_worldmapwindow/source/worldmapwindow.lua:
if (GameData.Player.level == GameData.LandOfTheDead.MinAccessLevel and IsPlayerInitialized() )
