Damage Priority

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

EverNife

Member
Feb 27, 2017
3
0
0
26
Hello, i have a problem.

I have a few custom tools and armors.

And my problem is in the order that damage events occurs;

For exemple:

I have a lore that will duplicate the damage of the tool.

And i have an armor that will reduce the damage of the attacker in 3 points.

I need the damage to be reduced before the duplication of the damage.

I am quite sure that in java you can solve this changing the priority, but... is that possible in skript?
 
Why dont just merge they two on the same on damage event?
 
Thats turn into a problem when you have more than 60 custom weapons / armors
 
Thats turn into a problem when you have more than 60 custom weapons / armors

Wouldn't it be a worse problem having 60 different on damage events every single of them being called every time you attack, even if it's with a normal weapon? That would definitely end up lagging the server.
 
Wouldn't it be a worse problem having 60 different on damage events every single of them being called every time you attack, even if it's with a normal weapon? That would definitely end up lagging the server.
That wouldn't lag the server unless you were doing something intensive in them, which doesn't seem to be the case
 
Well if that's the case, i still see no reason not to merge everything into 1 event, it would be easier to modify and as i said, the easiest way to approach the problem. If you have all the code for your weapons and armor in the same event you need not to worry about priorities.
 
Well if that's the case, i still see no reason not to merge everything into 1 event, it would be easier to modify and as i said, the easiest way to approach the problem. If you have all the code for your weapons and armor in the same event you need not to worry about priorities.

It will be hard to edit...
Depending on, there will be more than 300 lines of code together...

But i think that does not existe priority on skript so...