#Saving UI position

1 messages · Page 1 of 1 (latest)

viscid current
#

Hi i'm currently doing a plugin + workshop to have a gui that is draggable i've done the ui/drag part but now i want to save the position of the ui and restore it when the player log back in so here my question :
How can i set and retrieve the x and y value of a ui.

viscid current
#

So we can't save ui position ? 😭

scarlet wind
viscid current
# scarlet wind No.

one last quesiton when i use a cs script did its get executed when im in game

#

i talk about this

#

or its just i use a librayry that are not in unturned so its not working

scarlet wind
#

scripts referencing actual scripts in-game = yes, do work.

viscid current
#

there is no way to avoid that ?

scarlet wind
viscid current
#

😭

pastel marten
#

You could create like 8 UI variants with different starting positions and let the player pick one along with dragging the UI so they dont have to drag it very far or at all @viscid current

#

I had a really convoluted idea on figuring out where the player placed the UI which would work. The issue is that you cant place a UI element anywhere meaning youd have to make like 300+ custom UI effect assets which would be hella dumb

north trail
#

Can't you edit a game objects transform through plugin ?

#

Not directly the effect but a subgame object

scarlet wind
north trail
#

yeah

scarlet wind
# north trail yeah

The best I can suggest is hooking up some activation event hooks to some empty game objects and then making those gameobjects active using the effect visibility method.

pastel marten
#

basically the problem is that; without a custom module that adds new RPC methods you cant tell the client to do stuff it was never designed to do