Page 1 of 1

When to create player GUI

Posted: Mon Aug 03, 2020 2:00 am
by dementedpeanut
I am pretty new to this and am struggling to find resources for GUI!

From what I understand GUI needs to be created for each player after 'on_player_created' but not before the first game tick. My current solution is to index each player that needs the GUI creating in the globals variable and then initialising each player either after the first tick or when a new player is created.

Is there a better solution to this or a built in function that can achieve the same thing?

Thanks

Re: When to create player GUI

Posted: Wed Aug 12, 2020 1:08 pm
by mrvn
I create the GUI in the opened event and destroy it in the close event. But it's a dynamic GUI for an entity so every time you open it the contents needs to be synced to the specific entity clicked. Creating the GUI from scratch is easier than updating it.