Hi there, trying to make a Crash gambling skript out of boredom. I have a multiplier starting at 1.0 increasing every 0.01x every 1 tick. This multiplier is shown in a GUI and when a player hovers over the item, the multiplier lore updates really slowly (e.g 1.02x -> 1.12x -> 1.12x OR 1.02x -> 1.22x -> 1.42x). One way to combat this is to keep opening the GUI to the player so it updates for them, but if they try clicking on the Multiplier item (the item that you need to click to cash out, and also view the multiplier then it just doesn't let you click at all, probably because the GUI is being opened every tick. Does anyone know of a possible solution to this?
Before you ask questions:
Have you tried setting the slot of the inventory only instead of opening the gui to the player every tick?
yes, I have. It just updates slowly like shown above 1.02x -> 1.12x etc. I have even debugged it by sending messages, it always sends the msg but barely updates
Why dont you use something else like a boss bar/title to show the multiplier instead?
Some people have their boss bars/titles disabled, it wouldnt really be ideal for that
Why dont you open the crash GUI to the player every other tick? (e.g +0.01x multi every tick, open gui to player every 2 ticks)
The multiplier will be very inaccurate causing it to only update every +0.02, and if the multiplier crashes at an odd number it will be really confusing for the players.
I would really appreciate any help from anyone, as well as criticism. I am not sure if Skript has a built in method to update inventories after a certain threshold as some kind of lag protection measure, or if its the variable saving being delayed.
