Hello,
I have a very strange issue that I have no idea how to fix.
So in my gamemode i use “OnPostLogin” event. I then retrieve the connected client, cast to the proper controller class and then I fire an “On owning client” event that adds a widget to this client. Now from within the widget I use “get game state” to retrieve the list of “playerstate” array. For some reason the widget can’t access the game state, it always returns 0. Althoug the widgets are added to the client as they should, basically everything works perfect, except that I can’t retrieve the game state on the client, server works fine.
The strange thing is that when I call this “on owning client” function from within the player controller itself, it works just fine. But when I call it from the gamemode using the connected controller ref it doesn’t work, although it kind of DOES work as it adds the widget and everything just fine, except that the in this “on owning client” I can’t access the gamestate.
Anyone have any clue what this strange behavior is?
This is the post login event inside gamemode
this is the on owning client event inside player controller
The widget gets added to client’s screen just fine. But inside the widget I can’t access the game state. When I call the OC_OpenConquestScreen event from within the controller it works but not from within the gamemode.
This is inside the widget:
On the client it always returns not valid for the gamestate.