Solved Custom Attack Damage

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

Maldini

New Member
Mar 24, 2020
6
0
1
I wanted to change the attack damage value for an iron sword

However this code isn’t working
Code:
On damage:
    If attacker or victim is in “GameWord”:
        If attacker is player:
            If attacker’s held item is an iron sword:
                Damage victim by 4 hearts
 
Code:
on damage:
    if attacker is in world "GameWorld":
        if tool of attacker is an iron sword:
            set (final) damage to 5

decide if you want to use the normal damage or final damage
 
While testing I've realized that when I set the damage to 2.5. It sometimes damages the player by 2 hearts instead of 2.5 hearts. Is there a way to fix this?
 
Status
Not open for further replies.