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?
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?