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.

Set dmg to values over 5k

Discussion in 'Skript' started by Radim, Apr 3, 2018.

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

    Radim Member

    Joined:
    Feb 22, 2017
    Messages:
    2
    Likes Received:
    0
    Hey guys,
    so updated my server to 1.12 and found out, that "damage victim by {_dmg}" (ofc in on damage event) will set the attacker to "<none>" when the entity is killed.
    In 1.8 and 1.9 it was OK.

    If i use "make attacker damage victim by {_dmg}" then the script will infinitely repeat itself -> because it triggers the on damage event -> workaround is with condition with difference between {lastatt::%attacker%} and now, but it's a bit dirty...

    And finally - the best way is using "set damage to {_dmg}", but it's ruined by minecraft's vanilla "damage indicator" brown hearths -> if my weapons do dmg even over 5k it will show with each hit 2,5k hearths -> RIP FPS (even when they're transparent with custom RP)

    Now i'm using
    if (victim's health-{_finaldamage}) is less than 1:
    make attacker damage victim by {_finaldamage}
    else:
    damage victim by {_finaldamage}/2

    -> Is it now the best way to do it while the damage victim is a bit broken?
     
  2. DieHollander_

    DieHollander_ Active Member

    Joined:
    Mar 25, 2018
    Messages:
    188
    Likes Received:
    12
    You could use variables to make it work fine
     
  3. Radim

    Radim Member

    Joined:
    Feb 22, 2017
    Messages:
    2
    Likes Received:
    0
    You mean variable with the last hit (as i'm using now)? It has one problem -> when you're using AoE attack from sword -> only one mob is damaged instead of N-mobs

    Or setting the attacker's name variable on victim? Because i need to have the attacker's name in more death events (Mythic Mobs, skillapi)
     
    #3 Radim, Apr 4, 2018
    Last edited: Apr 4, 2018
Thread Status:
Not open for further replies.

Share This Page

Loading...