Effect on {OznaceniSmrti.%loop-player%}

  • 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 community!

    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.

Barbarx

Active Member
Feb 25, 2017
71
5
0
VERSION: 1.11.2
SKRIPT VERSION: the newest
UMBASKA VERSION: the newest with all modules

effect dont work and dont know why. i think 14 -18 line. message dd is only testing if it works but didnt work.
please help me :emoji_frowning:(

LINK: https://hastebin.com/rayotavahi.vbs
 
This code is pretty bad; why the big "if victim is <this> or <this> or <this>" when you could just use else? Why damage something again in a damage event? It probably won't go through due to the invulnerability frames (or it will make the damage event's damage not go through for the same reason). Are you SURE that the OznaceniSmrti variable is set to true? How is it getting set to true?

The code could at least be cleaned up to look more like this, but it still probably won't solve your problem if you're not using and setting the variables correctly.
code_language.skript:
on damage:
    {OznaceniSmrti.%victim%} is true
    attacker is player
    if victim is player:
        damage the victim by 1
    else:
        damage the victim by 5
    wait 10 seconds
    if {OznaceniSmrti.%victim%} is true:
        set {OznaceniSmrti.%victim%} to false

every 10 ticks:
    loop all players:
        if {OznaceniSmrti.%loop-player%} is true:
            drawWarpRings style 1, particle "redstone", RGB 80, 255, 255, center location of block at player, id "%loop-player%-mark", rainbowMode true, scan true, height 2, radius 2, ringCount 40, ringDensity 20, visibleRange 32, pulseDelay 2
 
i set OznaceniSmrti with this code.
code_language.skript:
on damage:
    if lore of tool of attacker contains "test2":
        chance of 100%:
            set {OznaceniSmrti.%victim%} to true
            message "&cByl jsi oznacen smrti" to victim
            message "&aOznacil si hrace" to attacker
and i will try you metode . and write if works.
And why i use or or or. because it works on armorstand if i use else:
and why i want to again damage entity? i wanna do bonus damage to player.
my bad i will use increase the damage by 1 and increase the damage by 5 to mobs.
 
Last edited by a moderator:
You don't need "chance of 100%" in that code (unless you're using it for debug and it is going to be lower when it's completed). If you want to make it do more damage and not affect armor stands, this should work:

code_language.skript:
on damage:
    {OznaceniSmrti.%victim%} is true
    attacker is player
    if victim is player:
        set damage to damage + 1
    else if "%victim%" isn't "armor stand":
        set damage to damage + 5
    wait 10 seconds
    if {OznaceniSmrti.%victim%} is true:
        set {OznaceniSmrti.%victim%} to false

every 10 ticks:
    loop all players:
        if {OznaceniSmrti.%loop-player%} is true:
            drawWarpRings style 1, particle "redstone", RGB 80, 255, 255, center location of block at player, id "%loop-player%-mark", rainbowMode true, scan true, height 2, radius 2, ringCount 40, ringDensity 20, visibleRange 32, pulseDelay 2
 
yeah this works. but i still have problem with this
code_language.skript:
every 10 ticks:
    loop all players:
        if {OznaceniSmrti.%loop-player%} is true:
            drawWarpRings style 1, particle "redstone", RGB 80, 255, 255, center location of block at player, id "%loop-player%-mark", rainbowMode
true, scan true, height 2, radius 2, ringCount 40, ringDensity 20, visibleRange 32, pulseDelay 2
because it isnt work..
 
You don't need to do a loop and constantly start the particles, you just need to start it once and use "center player" instead of "center location of block at player" and it should follow them forever.
 
Status
Not open for further replies.