Solved Gui in Gui Not working :(

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Status
Not open for further replies.

devsucs

New Member
Jul 1, 2020
5
0
1
25
hello i am trying to make a gui open another gui but for some reason it just closes the first gui i have made an example with 2 options of command execution i tryed and did not work for me i did allsoo check if everything was okey with the alinement and that did just be fine no problems with that help me please
Code:
command /examplecommand:
    trigger:
        open chest with 3 rows named "Shops" to player
        format slot 10 of player with iron sword named "combat shop" to close then run [make player execute command "/combatshop"]
        format slot 12 of player with oak sapling named "farm shop" to close then run [execute player command "/farmshop"]
 
Hello, I would suggest using functions to create guis. You can call upon a function and open a new gui inside of a gui. I also recommend using TuSKe for guis.
 
Hello, I would suggest using functions to create guis. You can call upon a function and open a new gui inside of a gui. I also recommend using TuSKe for guis.
can you show an example that would rlly help!
 
TuSKe is glitchy, a lot of the times it flat out acts like a chest where you can just take items. Use vanilla GUIs.

They won't really work on Minehut, as 1.14+ has messed them up a bit, and to fix it you need Skript-mirror, but chances are you're not on Minehut.

Here's how to use them:
Code:
command /example:
    trigger:
        open chest inventory with 1 row named "&euwu" to player
        set slot 0 of player to diamond ore named "Example"
on inventory click:
    if event.getView().getTitle() == "&euwu": # it's this, or getTitle().getView(), i dont remember 1000%.
        # here is the way I like to do it:
        if index of event-slot == 0:
            message "Yay!"
        # a more traditional way
        if event-slot == diamond ore named "Example":
            message "Yahoo!"
i have my own dedicated server soo hosting is no problem i use paper version 1.15.2
 
Thanks to:
Hello, I would suggest using functions to create guis. You can call upon a function and open a new gui inside of a gui. I also recommend using TuSKe for guis.

TuSKe is glitchy, a lot of the times it flat out acts like a chest where you can just take items. Use vanilla GUIs.

They won't really work on Minehut, as 1.14+ has messed them up a bit, and to fix it you need Skript-mirror, but chances are you're not on Minehut.

Here's how to use them:
Code:
command /example:
    trigger:
        open chest inventory with 1 row named "&euwu" to player
        set slot 0 of player to diamond ore named "Example"
on inventory click:
    if event.getView().getTitle() == "&euwu": # it's this, or getTitle().getView(), i dont remember 1000%.
        # here is the way I like to do it:
        if index of event-slot == 0:
            message "Yay!"
        # a more traditional way
        if event-slot == diamond ore named "Example":
            message "Yahoo!"

I made this little peace of skript that works for me i hope anyone else with this problem is allso helped with this

here is working code:

Code:
command /gui:
    trigger:
        open virtual chest inventory with size 3 named "First GUI" to player
        format gui slot 10 of player with book named "seccondgui" to close then run player command "/seccondgui"

thanks for your help guys!
 
Status
Not open for further replies.