With the new fortnite creative tools I have been creating a game where players are able to buy upgrades over the course of a match. Originally I was using a series of conditional buttons and item granters but I felt that the shop took up too much space so I started working on making a custom ui using creative devices and verse that would be much more compact.
It works pretty well, players are able to click the shop buttons and get the items. There is also a slightly transparent color block behind all the buttons and text blocks that acts as a background.
However, when a second player interacts with the button while the first player is still viewing the shop a problem happens. The first player’s canvas will remove all the buttons including the exit button, trapping them in UI input mode with no way to exit. The second player’s shop canvas will work as intended and there are no problems on their end. The odd behavior is that the earlier mentioned color block does NOT disappear like the buttons do.
For reference my creative device’s code is based heavily off the code snippet “UI Text Popup with Next/Exit Button”
HandleShopButtonUIAddInteraction is connected to an editable button reference through subscribe on interaction
HandleShopButtonUIAddInteraction(Agent:agent):void=
Print("Shop opened")
AddCanvas(Agent)
AddCanvas(Agent:agent):void=
Print("Add canvas")
if (InPlayer := player[Agent], PlayerUI := GetPlayerUI[InPlayer]):
if (MyUI := AgentCanvas[InPlayer]?){}
PlayerUI.RemoveWidget(MyUI)
if (set AgentCanvas[InPlayer] = false) {}
else:
NewUI := CreateMyUI()
PlayerUI.AddWidget(NewUI, player_ui_slot{InputMode := ui_input_mode.All})
if (set AgentCanvas[InPlayer] = option{NewUI}) {}
Does anyone know what could be causing this behavior or am I running into a current limitation on creative devices?