You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could you add copying slots from other GUI when creating a new GUI?
example code:
on load:
create gui with id "menu" with virtual chest inventory with 3 rows named "menu":
make gui slot 0 to dirt named "just dirt":
player command "/say dirt"
on join:
create gui with id "menu.%player%" named "%player%'s menu" copied from gui with id "menu":
make gui slot 1 to skull of player
wait 1 seconds
open gui with id "menu.%player%" to player # dirt and player's head are displayed.
The text was updated successfully, but these errors were encountered:
This could be added, but I'm not sure how useful it would be. You could always use a function with a player argument to create the GUI.
The only thing I could really see being beneficial is performance impact maybe? But I don't think that's really an issue 🙂
I think something you could do instead of a copy is add a new parse tag for "template" like how "removeable" is starting from 1.3
atleast I think it's starting in 1.3 I don't recall it looking like this until that update
since I believe having a template is basically the same as this but something more people who would use and find more understandable. A fully fleshed out example of it could be something like this.
set {_shape::*} to"xxxxxxxxx","x1111111x","x1111111x", and"xxxxxxxxx"
create template gui withid"border"with chest inventory with4 rows with shape {_shape::*}:
format gui slot "x"with black glass pane named""
unformat gui slot "1"
command /use_template:
trigger:
create a new gui using template "border":
setnameofthe gui to"My Template GUI"
edit the gui:
format next gui slot with lava bucket
format gui slot 11with water bucket
While as you stated only known good use would be performance. The other use is using it as a template for mass creation of guis such as shops
Hello.
Could you add copying slots from other GUI when creating a new GUI?
example code:
The text was updated successfully, but these errors were encountered: