Hello ladies and gents,
so i’m having a problem with creating a multiplayer game when it comes to HUD creation, HUD created from the player controller where it says none trying to read the variable even tho the widget has been created but when I try to access the HUD variable it says its invalid.
its a dedicated server setup where in Game Mode I have OnPostLogin event assign a controller and spawns a character, and both clients see eachother and walk as well, so the hud created on event begin play of the controller, as I said the hud shows and everything is fine, but the widgets variable is set to null for some reason, I tried to put some delays just incase the engine is processing the information too fast.
GameMode:
https://forums.unrealengine.com/filedata/fetch?filedataid=156510&type=thumb
I have a login system setup in my GameInfo using Varest plugin and updating the character stats and all is working well and shows it in the hud.
PlayerController:
https://forums.unrealengine.com/filedata/fetch?filedataid=156512&type=thumb
Note: it works fine without any errors in the editor, using all methods of play such as Play in view port or standalone,
packaging the game and building a development server from visual studio and testing the game, everything goes wrong, it still shows the created HUD for both clients and note that I have an inventory system setup on my Playerstate it shows the inventory slots but when I try and pick up an item and try to update the HUD it gives me none trying to read as if the hud not created and assigned to a variable, I gave it a delay and tried to run on server custom event but still no success.
now I have a lot of variables in my hud which gets fed from the gameinfo when requesting player information from my php server on login such as character name, stats, how many slots there and the item ID and amount and it works like a charm like a saving system but “global”.
I can provide more photos or even a video of the whole process of starting the game in dedicated server on demand on private to get this done.
I thought I would try and transform the whole inventory system to the player controller and im not afraid of “losing any of the properties on changing the level” because i’m making an open world mmorpg and a teleporting system which is already working. but this is not the issue, my issue is the HUD variable that is “Set” after create widget node not getting a value even tho its created which is really depressing, now I tried to assign an event from the gamemode when the character has spawned to create a hud, but still getting the same results, none trying to access HUD variable.
any help or advice is much appreciated!
Note: i’m using source version of the engine 21, latest out there incase 21 doesn’t exist xD