Changing a variable item's display name changes original item, too ...

  • 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.

pepper82

Member
Jan 26, 2017
272
1
18
41
Hi all,
I have this command:
code_language.skript:
command /looptest:
    trigger:
        set {_temp} to player's tool
        set {_name} to {_temp}'s display name
        replace all "%%player%%" with "%player%" in {_name}
        set display name of {_temp} to {_name}
        give player {_temp}
This will also change the display name of the original's tool in player's hand but it should only change the name of the "copied" tool. What is wrong here? A Skript bug?

With the first line "set {_temp} to player's tool" it should make a copy of the player's tool, right?
If not, how would I store the complete item in a variable?
 
Last edited:
hmm.. if you set some variable to "tool of player" its data which updates when player changes his tool.. and you set next vriable to name of current tool of player.. so it will be every time same.. so you have to change line 2: "set {_name} to display name of tool of player".. maybe im wrong but try it..
 
I think this is more like a bug. I had something similar lately as well
 
Status
Not open for further replies.