Hello, I'm trying to do something pretty simplistic, but I do not find.
I wish that when clicking on the object, it detects if it is a right click or left click.
In the place underlined in the image, I would like to replace that by a detection (is it a right or left click). I already tried right or left, it does not work
Here is my code below
Thank you in advance,
Aralwen.
I wish that when clicking on the object, it detects if it is a right click or left click.
In the place underlined in the image, I would like to replace that by a detection (is it a right or left click). I already tried right or left, it does not work
Here is my code below
code_language.skript:
command /gui:
trigger:
open virtual chest with 4 rows named "&8Settings" to player
format gui slot 0 of player with gray dye named "&7Name &8- &e%{test}%" to run function Test(player, "left", "Villager")
function Test(p: Player, clicktype: String, role: text):
if {_role} is "Villager":
if {_clicktype} is "left":
broadcast "&a+1"
add 1 to {test}
make {_p} execute command "/gui"
if {_clicktype} is "right":
broadcast "&c-1"
remove 1 from {test}
make {_p} execute command "/gui"
Thank you in advance,
Aralwen.