Tuske gui opening in another gui

  • 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 skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

turtlei

Member
Sep 29, 2020
3
0
1
25
Hello
I am using Tuske to make my guis
How do I script it so that an item inside one gui once clicked redirects to another gui?
(For example an emerald that says "Next page")

Thank you
 
Create a function for all guis and call this function, when you need to

sry for the English, I'm not a native speaker
 
  • Like
Reactions: turtlei
Ok, when I make my function,
1. what parameters do I set it to,
2. and I am trying to put in the items in the slots but I can't because it needs the "of player" in there. But if I leave it in there it will say that there can not be "Player" in function. How do I fix this?

Note: I am using Tuske for my guis
 
Ok, when I make my function,
1. what parameters do I set it to,
2. and I am trying to put in the items in the slots but I can't because it needs the "of player" in there. But if I leave it in there it will say that there can not be "Player" in function. How do I fix this?

Note: I am using Tuske for my guis

Multi-pages GUI from https://forums.skunity.com/threads/gui-manager-tutorial.2349/

Code:
function openMenu(p: Player, type: String):
    if {_type} is "page 1":
        open virtual chest inventory with size 1 named "Page 1" to {_p}
        make a gui slot 0 of {_p} with stone named "Go to page 2" to run function openMeny({_p}, "page 2")
    else if {_type} is "page 2":
        open virtual chest inventory with size 1 named "Page 2" to {_p}
        make a gui slot 0 of {_p} with stone named "Go to page 3" to run function openMeny({_p}, "page 3")
   #And so on until ends of page...
    else if {_type} is "page 3":
        open virtual chest inventory with size 1 named "Page 3" to {_p}
        make a gui slot 0 of {_p} with stone named "Go back to page 1" to run function openMeny({_p}, "page 1")
 
Multi-pages GUI from https://forums.skunity.com/threads/gui-manager-tutorial.2349/

Code:
function openMenu(p: Player, type: String):
    if {_type} is "page 1":
        open virtual chest inventory with size 1 named "Page 1" to {_p}
        make a gui slot 0 of {_p} with stone named "Go to page 2" to run function openMeny({_p}, "page 2")
    else if {_type} is "page 2":
        open virtual chest inventory with size 1 named "Page 2" to {_p}
        make a gui slot 0 of {_p} with stone named "Go to page 3" to run function openMeny({_p}, "page 3")
   #And so on until ends of page...
    else if {_type} is "page 3":
        open virtual chest inventory with size 1 named "Page 3" to {_p}
        make a gui slot 0 of {_p} with stone named "Go back to page 1" to run function openMeny({_p}, "page 1")


bruh. instead of make a gui slot 0 of {_p}, you need to use this code instead:
format gui slot 0 of player with [item go here w/o brackets] named "Name go here" to close then run player command "/command go here"
there you go, also spoonfeed from another reply i made
 
Status
Not open for further replies.