Files
BusyRabbit/Content/Lua/Level/LevelPlayerState.lua

12 lines
368 B
Lua
Raw Normal View History

2025-09-28 01:32:54 +08:00
local GameplayStatics = import("GameplayStatics")
local LevelPlayerState = {}
function LevelPlayerState:ReceiveBeginPlay()
local pc = GameplayStatics.GetPlayerController(self, 0)
local role = self:CreateRoleRoster(pc)
print("LevelPlayerState:ReceiveBeginPlay", role, self:HasAuthority())
pc:Possess(role)
end
return Class(nil, nil, LevelPlayerState)