Solved Scoreboard Skipping Line 5

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

JustADev

Well-Known Member
Apr 8, 2017
379
9
18
22
How do I fix this so it doesnt stop line 5?

CODE:
code_language.skript:
on join:
    wait 1 tick
    wipe player's sidebar
    set name of sidebar of player to "&c&lKitPvP"
    set score "&8" in sidebar of player to 10
    set score "&fName: &c%player%" in sidebar of player to 9
    set score "&8" in sidebar of player to 8
    set score "&fTotal Kills &8&l» &7%{kills.%UUID of player%}%" in sidebar of player to 7
    set score "&fTotal Deaths &8&l» &7%{deaths.%UUID of player%}%" in sidebar of player to 6
    set score "&8" in sidebar of player to 5
    set score "&fCoins &8&l» &7%{upgradepoints::%player%}%" in sidebar of player to 4
    set score "&fShards &8&l» &7%{Heroicupgradepoints::%player%}%" in sidebar of player to 3
    set score "&fXP &8&l» &7%{XPUpgradepoints::%player%}%" in sidebar of player to 2
    set score "&8" in sidebar of player to 1
    set score "&ewww.chaoticnet.pro" in sidebar of player to 0

Also, How Do I make it count deaths/kills as a variable, like the on Death event? Can someone show me with code?
 
for counting kills/deaths, you can do something like
code_language.skript:
on death of player:
    add 1 to {deaths.%victim%}
    add 1 to {Kills.%attacker%}
[doublepost=1501466981,1501466722][/doublepost]Your sidebar seems to work very well for me. it doesn't stop at line 5
e02a11fc24.png
 
tysm
[doublepost=1501467642,1501467444][/doublepost]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?
[doublepost=1501467987][/doublepost]So like maybe set it to add 1 to {deaths::%player%} but idk how you would do it for kills
 
for counting kills/deaths, you can do something like
code_language.skript:
on death of player:
    add 1 to {deaths.%victim%}
    add 1 to {Kills.%attacker%}
[doublepost=1501466981,1501466722][/doublepost]Your sidebar seems to work very well for me. it doesn't stop at line 5
e02a11fc24.png
Liiiiistttt vars and uuids, all you have to do is {deaths::%victim's uuid%} and it instantly becomes much better
 
Ok cool, now how do i get scoreboard to auto update
[doublepost=1501469558,1501469483][/doublepost]Also it gives me an error msg
 
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:
Ok cool, now how do i get scoreboard to auto update
Have it update on the death event.
code_language.skript:
on death of player:
    add 1 to {deaths.%victim%}
    add 1 to {Kills.%attacker%}
    set score "&fTotal Kills &8&l» &7%{kills.%attacker%}%" in sidebar of player to 7
    set score "&fTotal Deaths &8&l» &7%{deaths.%victim%}%" in sidebar of player to 6
 
OMG ty now how do i get it to auto update
[doublepost=1501470382,1501470065][/doublepost]Also this glitch happens, if you know how to fix, once I die, this happens to scoreboard:
https://gyazo.com/97e8555682ac6fa3ca82d0ed345e2ba5
sorry was making dinner, try this perhaps.
code_language.skript:
every 10 seconds in world "world":
    loop all players:
        wait 1 tick
        wipe loop-player's sidebar
        set name of sidebar of loop-player to "&c&lKitPvP"   
        set score "&8" in sidebar of loop-player to 8
        set score "&fTotal Kills &8&l» &7%{kills.%loop-player%}%" in sidebar of loop-player to 7
        set score "&fTotal Deaths &8&l» &7%{deaths.%loop-player%}%" in sidebar of loop-player to 6
        set score "&8" in sidebar of loop-player to 5
        set score "&fCoins &8&l» &7%{upgradepoints::%loop-player%}%" in sidebar of loop-player to 4
        set score "&fShards &8&l» &7%{Heroicupgradepoints::%loop-player%}%" in sidebar of loop-player to 3
        set score "&fXP &8&l» &7%{XPUpgradepoints::%loop-player%}%" in sidebar of loop-player to 2
        set score "&8" in sidebar of loop-player to 1
        set score "&ewww.chaoticnet.pro" in sidebar of loop-player to 0
 
Ok, that works, but that still doesnt fix this problem:
https://gyazo.com/97e8555682ac6fa3ca82d0ed345e2ba5
it's not doing that for me. Here, this is the exact code I have in my test skript.
code_language.skript:
on death of player:
    add 1 to {deaths.%victim%}
    add 1 to {Kills.%attacker%}

every 10 seconds in world "world":
    loop all players:
        wait 1 tick
        wipe loop-player's sidebar
        set name of sidebar of loop-player to "&c&lKitPvP"  
        set score "&8" in sidebar of loop-player to 8
        set score "&fTotal Kills &8&l» &7%{kills.%loop-player%}%" in sidebar of loop-player to 7
        set score "&fTotal Deaths &8&l» &7%{deaths.%loop-player%}%" in sidebar of loop-player to 6
        set score "&8" in sidebar of loop-player to 5
        set score "&fCoins &8&l» &7%{upgradepoints::%loop-player%}%" in sidebar of loop-player to 4
        set score "&fShards &8&l» &7%{Heroicupgradepoints::%loop-player%}%" in sidebar of loop-player to 3
        set score "&fXP &8&l» &7%{XPUpgradepoints::%loop-player%}%" in sidebar of loop-player to 2
        set score "&8" in sidebar of loop-player to 1
        set score "&ewww.chaoticnet.pro" in sidebar of loop-player to 0  

on join:
    wait 1 tick
    wipe player's sidebar
    set name of sidebar of player to "&c&lKitPvP"
    set score "&8" in sidebar of player to 10
    set score "&fName: &c%player%" in sidebar of player to 9
    set score "&8" in sidebar of player to 8
    set score "&fTotal Kills &8&l» &7%{kills.%player%}%" in sidebar of player to 7
    set score "&fTotal Deaths &8&l» &7%{deaths.%player%}%" in sidebar of player to 6
    set score "&8" in sidebar of player to 5
    set score "&fCoins &8&l» &7%{upgradepoints::%player%}%" in sidebar of player to 4
    set score "&fShards &8&l» &7%{Heroicupgradepoints::%player%}%" in sidebar of player to 3
    set score "&fXP &8&l» &7%{XPUpgradepoints::%player%}%" in sidebar of player to 2
    set score "&8" in sidebar of player to 1
    set score "&ewww.chaoticnet.pro" in sidebar of player to 0
d38267d337.jpg
 
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
 
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
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_language.skript:
on damage:
    set {_loc} to the location 1 meter above the victim
    drawDot count 5, particle "itemcrack", material redstone, XYZ 0, 0, 0, center {_loc}, visibleRange 320, pulseDelay 0, keepFor 10 ticks
 
Wait, no, I wanted it to actually drop redstone, bonemeal, and bones from the center of the player
[doublepost=1501476598,1501476050][/doublepost]How do I center it in the exact center of a player?
 
Wait, no, I wanted it to actually drop redstone, bonemeal, and bones from the center of the player
[doublepost=1501476598,1501476050][/doublepost]How do I center it in the exact center of a player?
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
 
Status
Not open for further replies.