#Is there any way to make the self updating elements per player rather than global

1 messages · Page 1 of 1 (latest)

frail pier
#

I want to add a trading section to my player menu thing that I'm working on and first of all I'm having an issue getting the drop-down to retrieve the inventory items so I decided to go with labels instead but then I can't seem to get the observable label that I'm using along with the for loop to duplicate it for each inventory item to work on a per player basis whilst keeping it dynamically updating is there any way I can do this because I can't figure it out any help would be greatly appreciated

lean hemlock
#

Whats your code?

wild ocean
#

Literally just saving in memory an observable for each player like
const obv = new Map()
for (const player of world.getPlayers()){
obv.set(player.id, Observable.create(base))
}

Then where u put the observable in the ui just do obv.get(player.id)

frail pier