i have some widgets that need to be locally controlled like the health witdget with some pictures which is in the gameplay hud and a chat widget and i set them in the playercontroller which seems to be the only way they work and are individual for each player but on servertravel when the night ends which i mightve used in a stupid way cause it just takes the players back to the same level but i used it to reset the procedually generated map and score, time and players locations and i managed to keep the score needed and the time/Night as they just need to be replicated the same for every player so i just put them in the hud for the gamemode but i need the health and chat widgets to stay and reset i guess, i tried adding the widgets to the NewHUD but it didnt work as i think it doesnt get the same player controllers or something and just added the health (gameplayhud widget) and chat with no values for all players but it also wont be locally controlled, i also tried adding a travel completed bool to the game state which is then read in the player controlled but i think that just does nothing, basically it doesnt matter if the chat or health resets back to the orignal states but need to keep them local for each player and appear after servertravel, i have many other problems too like if a player is tabbed out after server travel they loose all input and such but i guess that would be good for another topic lol. any tips or help would be appreciated.
I’ve never used server travel before but it looks like it will load whatever level you choose it to. If that’s the case the reason why your widgets reset is because when you load a level it throws away all the temp values you have made like add 10 to currency or whatever. You’ll need to make a save system using a game instance (as that is persistent) and update any data you’ll need and when you load the level you’ll have to load the save game you want. There are plenty of youtube tutorials out there on save systems so look into those
i’ll try it out and see what happens, thanks so much for replying
1 Like