Hi!
Just wandering if anyone knows of a possible way to create an element within a container of multiple elements instead of the entire container?
My Aim:
I have 2 elements in a container and I want to destroy one element and replace it with a new one if their colour is not the same, if the colours are the same then it can just stay on screen until destroyed. I store the information on the details of each element in a dictionary tied to a player's ID, so I cannot do the check while I am creating each element of the container, as I will not always know the player before hand, I could also end up with some players needing a replacement element, and some not because it is of the required colour already.
Cheers!
Create Element Instead Of Element Container? (C#)
Discussion in 'Rust Development' started by JoeSheep, Aug 18, 2016.
-
Wulf Community Admin
Pretty sure are few of my GUI plugins might have what you are looking for.
-
I will take a look! I would just go ahead and experiment but I don't have access to a server to test on at the moment.
-
@Wulf Looking through ZLevelsRemastered, is appears that the method used it to find the player first then pass the known parameters to the FillElements method then create the container. So I can see that as a way to do what I want to do. However, would that not use more resources making up each element for every player?
My two ideas are to either use a similar method to ZLevels or have two element containers and decide what to create on each player that way, meaning just 2 containers are created in the code rather than 2 times the amount of players on the server, I am just not sure which would use less resources? -
Wulf Community Admin
I didn't develop or design ZLevelsRemastered, I just posted a fix for it. @Nogrod is much more experienced with CUI performance too. -
What are your thoughts @Nogrod ?
