1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

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

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Scoreboard Skipping Line 5

Discussion in 'Skript' started by JustADev, Jul 31, 2017.

Thread Status:
Not open for further replies.
  1. JustADev

    JustADev Well-Known Member

    Joined:
    Apr 8, 2017
    Messages:
    380
    Likes Received:
    9
    How do I fix this so it doesnt stop line 5?

    CODE:
    Code (Skript):
    1. on join:
    2.     wait 1 tick
    3.     wipe player's sidebar
    4.     set name of sidebar of player to "&c&lKitPvP"
    5.     set score "&8" in sidebar of player to 10
    6.     set score "&fName: &c%player%" in sidebar of player to 9
    7.     set score "&8" in sidebar of player to 8
    8.     set score "&fTotal Kills &8&l» &7%{kills.%UUID of player%}%" in sidebar of player to 7
    9.     set score "&fTotal Deaths &8&l» &7%{deaths.%UUID of player%}%" in sidebar of player to 6
    10.     set score "&8" in sidebar of player to 5
    11.     set score "&fCoins &8&l» &7%{upgradepoints::%player%}%" in sidebar of player to 4
    12.     set score "&fShards &8&l» &7%{Heroicupgradepoints::%player%}%" in sidebar of player to 3
    13.     set score "&fXP &8&l» &7%{XPUpgradepoints::%player%}%" in sidebar of player to 2
    14.     set score "&8" in sidebar of player to 1
    15.     set score "&ewww.chaoticnet.pro" in sidebar of player to 0
    16.  
    Also, How Do I make it count deaths/kills as a variable, like the on Death event? Can someone show me with code?

     
  2. Best Answer:
    Post #4 by ShaneBee, Jul 31, 2017
  3. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,158
    Likes Received:
    170
    for counting kills/deaths, you can do something like
    Code (Skript):
    1. on death of player:
    2.     add 1 to {deaths.%victim%}
    3.     add 1 to {Kills.%attacker%}
    --- Double Post Merged, Jul 31, 2017, Original Post Date: Jul 31, 2017 ---
    Your sidebar seems to work very well for me. it doesn't stop at line 5
    [​IMG]
     
  4. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,158
    Likes Received:
    170
    No I mean, I set line 5 to display "&8" but it completely skips it, look at the numbers at the side
     
  5. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,158
    Likes Received:
    170
    Oh I see what you mean. that's because you have it set to a color code, but nothing the actual fill the line. put a space after &8
     
    • Like Like x 1
  6. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,158
    Likes Received:
    170
    tysm
    --- Double Post Merged, Jul 31, 2017, Original Post Date: Jul 31, 2017 ---
    Wait the Deaths and Kills thing doesnt work, what do i need to set the value to on the line its on for the scoreboard to display the deaths/kills properly? also how do i make it autoupdate?
    --- Double Post Merged, Jul 31, 2017 ---
    So like maybe set it to add 1 to {deaths::%player%} but idk how you would do it for kills
     
    • Friendly Friendly x 1
  7. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,158
    Likes Received:
    170
    Liiiiistttt vars and uuids, all you have to do is {deaths::%victim's uuid%} and it instantly becomes much better
     
    • Agree Agree x 1
  8. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,158
    Likes Received:
    170
    Ok cool, now how do i get scoreboard to auto update
    --- Double Post Merged, Jul 31, 2017, Original Post Date: Jul 31, 2017 ---
    Also it gives me an error msg
     
  9. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,158
    Likes Received:
    170
    I'm not sure why you would need it as a list variable, it only has to hold one number, and that's the total right?(May be mistaken) but this here works for me:
    Have it update on the death event.
    Code (Skript):
    1. on death of player:
    2.     add 1 to {deaths.%victim%}
    3.     add 1 to {Kills.%attacker%}
    4.     set score "&fTotal Kills &8&l» &7%{kills.%attacker%}%" in sidebar of player to 7
    5.     set score "&fTotal Deaths &8&l» &7%{deaths.%victim%}%" in sidebar of player to 6
     
  10. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,158
    Likes Received:
    170
  11. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,158
    Likes Received:
    170
  12. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,158
    Likes Received:
    170
    OMG ty now how do i get it to auto update
    --- Double Post Merged, Jul 31, 2017, Original Post Date: Jul 31, 2017 ---
    Also this glitch happens, if you know how to fix, once I die, this happens to scoreboard:
    https://gyazo.com/97e8555682ac6fa3ca82d0ed345e2ba5
     
  13. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,158
    Likes Received:
    170
    sorry was making dinner, try this perhaps.
    Code (Skript):
    1. every 10 seconds in world "world":
    2.     loop all players:
    3.         wait 1 tick
    4.         wipe loop-player's sidebar
    5.         set name of sidebar of loop-player to "&c&lKitPvP"  
    6.         set score "&8" in sidebar of loop-player to 8
    7.         set score "&fTotal Kills &8&l» &7%{kills.%loop-player%}%" in sidebar of loop-player to 7
    8.         set score "&fTotal Deaths &8&l» &7%{deaths.%loop-player%}%" in sidebar of loop-player to 6
    9.         set score "&8" in sidebar of loop-player to 5
    10.         set score "&fCoins &8&l» &7%{upgradepoints::%loop-player%}%" in sidebar of loop-player to 4
    11.         set score "&fShards &8&l» &7%{Heroicupgradepoints::%loop-player%}%" in sidebar of loop-player to 3
    12.         set score "&fXP &8&l» &7%{XPUpgradepoints::%loop-player%}%" in sidebar of loop-player to 2
    13.         set score "&8" in sidebar of loop-player to 1
    14.         set score "&ewww.chaoticnet.pro" in sidebar of loop-player to 0    
     
  14. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,158
    Likes Received:
    170
  15. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,158
    Likes Received:
    170
    it's not doing that for me. Here, this is the exact code I have in my test skript.
    Code (Skript):
    1. on death of player:
    2.     add 1 to {deaths.%victim%}
    3.     add 1 to {Kills.%attacker%}
    4.  
    5. every 10 seconds in world "world":
    6.     loop all players:
    7.         wait 1 tick
    8.         wipe loop-player's sidebar
    9.         set name of sidebar of loop-player to "&c&lKitPvP"  
    10.         set score "&8" in sidebar of loop-player to 8
    11.         set score "&fTotal Kills &8&l» &7%{kills.%loop-player%}%" in sidebar of loop-player to 7
    12.         set score "&fTotal Deaths &8&l» &7%{deaths.%loop-player%}%" in sidebar of loop-player to 6
    13.         set score "&8" in sidebar of loop-player to 5
    14.         set score "&fCoins &8&l» &7%{upgradepoints::%loop-player%}%" in sidebar of loop-player to 4
    15.         set score "&fShards &8&l» &7%{Heroicupgradepoints::%loop-player%}%" in sidebar of loop-player to 3
    16.         set score "&fXP &8&l» &7%{XPUpgradepoints::%loop-player%}%" in sidebar of loop-player to 2
    17.         set score "&8" in sidebar of loop-player to 1
    18.         set score "&ewww.chaoticnet.pro" in sidebar of loop-player to 0  
    19.  
    20. on join:
    21.     wait 1 tick
    22.     wipe player's sidebar
    23.     set name of sidebar of player to "&c&lKitPvP"
    24.     set score "&8" in sidebar of player to 10
    25.     set score "&fName: &c%player%" in sidebar of player to 9
    26.     set score "&8" in sidebar of player to 8
    27.     set score "&fTotal Kills &8&l» &7%{kills.%player%}%" in sidebar of player to 7
    28.     set score "&fTotal Deaths &8&l» &7%{deaths.%player%}%" in sidebar of player to 6
    29.     set score "&8" in sidebar of player to 5
    30.     set score "&fCoins &8&l» &7%{upgradepoints::%player%}%" in sidebar of player to 4
    31.     set score "&fShards &8&l» &7%{Heroicupgradepoints::%player%}%" in sidebar of player to 3
    32.     set score "&fXP &8&l» &7%{XPUpgradepoints::%player%}%" in sidebar of player to 2
    33.     set score "&8" in sidebar of player to 1
    34.     set score "&ewww.chaoticnet.pro" in sidebar of player to 0    
    [​IMG]
     
  16. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,158
    Likes Received:
    170
    Ok, it works, I fixed it on my own, now can you help me with this:

    When a player dies, make the player explode out redstone dust, bones, and bone meal then clear redstone dust, bones, and bone meal
     
  17. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,158
    Likes Received:
    170
    haha, you have many really cool ideas. Use SkDragons particles for that. They have very good documentation and examples on the addon page. there's a list of possible particle types on there too. Just to give you one example here:
    Code (Skript):
    1. on damage:
    2.     set {_loc} to the location 1 meter above the victim
    3.     drawDot count 5, particle "itemcrack", material redstone, XYZ 0, 0, 0, center {_loc}, visibleRange 320, pulseDelay 0, keepFor 10 ticks
     
  18. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,158
    Likes Received:
    170
    Wait, no, I wanted it to actually drop redstone, bonemeal, and bones from the center of the player
    --- Double Post Merged, Jul 31, 2017, Original Post Date: Jul 31, 2017 ---
    How do I center it in the exact center of a player?
     
  19. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,158
    Likes Received:
    170
    but then you said you wanted them to clear right? So if you want it to spawn then clear, why not just use particles that look the same?
    also the location set to 1 meter above the player technically sets it in the middle. else wise they show at the player's feet
     
  20. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,158
    Likes Received:
    170
    Oh, can you show me how to do that?
     
  21. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,158
    Likes Received:
    170
    ye I did in my above post:emoji_grinning:
    [​IMG]
     
Thread Status:
Not open for further replies.
Loading...