You resolved my problem about how to hide UI, thank you very much but i’m facing another problem :
this UI is only displayed to only one player and what you suggested doesn’t work in my case…
I just need to display the same UI on all players that enter in the island, i’m not looking for other things and it seems to be very difficult to settle imo…
I tried this way from this topic : How do I Show a UI Widget and Update it to Every Player in game - #3 by YouTube_Giova
But still not effective…
I’m sorry but i’m learning Verse since 2 months and i have low experience in programming.
So i modified some parts of my code :
var TextWidget : text_block = text_block{DefaultTextColor := color{R:=1.0, G := 1.0, B:= 1.0}}
OnBegin<override>()<suspends> : void =
TeleportDrop.TeleportedEvent.Subscribe(WrapOnPlayerTeleported)
EliminationManager1.EliminationEvent.Subscribe(OnPlayerElimination)
var PlayersUI : []player = GetPlayspace().GetPlayers() #Get All Players
set AllPlayersCount = GetPlayspace().GetPlayers().Length #Get sum of all players
var PlayersTP : string = ToString("{PlayersTeleported}/{AllPlayersCount}")
for(Player : PlayersUI):
AddUIToPlayer(Player)
loop:
for(Player : PlayersUI):
if(FortniteCharacter : fort_character = Player.GetFortCharacter[]):
UpdateUI()
AddUIToPlayer(Player : agent) : void =
if(PlayerUI := GetPlayerUI[player[Player]]):
Print("UI To Player")
PlayerUI.AddWidget(CreateUI(Player))
CreateUI(Player : agent) : canvas =
UpdateUI()
userInterface : canvas = canvas :
Slots := array:
canvas_slot:
Anchors := anchors{Minimum := vector2{X := 0.0, Y := 0.5}, Maximum := vector2{X := 0.0, Y:= 0.5}}
Offsets := margin{Top := 300.0, Left := 0.0, Right := 0.0, Bottom := 0.0}
Alignment := vector2{X := 0.0, Y := 1.0}
SizeToContent := false
Widget := TextWidget
return userInterface
UpdateUI() : void =
Print("Update UI")
var PlayersTP : string = ToString("{PlayersTeleported}/{AllPlayersCount}")
TextWidget.SetText(GetPlayerListTP(ToString(PlayersTP)))
GetPlayerListTP<localizes>(PlayersTP2 : string) : message = "TOTAL PLAYERS QUALIFIED FOR THE NEXT ROUND : {PlayersTP2}"
What’s wrong with this code