Damage Modification

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

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

NeonEthan

Member
Jul 6, 2020
2
0
1
22
Hi! I'm trying to create a skript which, when wearing a player head, gives the same amount of protection as a diamond helmet. It seems simple and not very long, but I have been unable to figure out how to do so.

I've been looking for quite awhile now over the forums and other websites, only to come to a dead end. I think it might be possible through Tuske's Damage Modification (https://prnt.sc/tyof5b) but I am confused how to get it to work.

I have something as simple as this

on damage:
if player's helmet is a head:
clear damage armor
add 3 to damage armor

(Sorry, I do not know how to put it in the format of code, but yes my formatting is fine)

I have Tuske installed, and shows in the plugins list, but it seems like I am doing something wrong. Also, I am very unsure if my code is even close to being right. As of right now, all I want is if a player is wearing a player head, then that head will have the same damage protection as a normal diamond helmet.
Here is the error: https://prnt.sc/typ2gq

Thank you!
 
You can try doing "set damage to (damage / 2)", this will divide the damage by 2. You can modify it however you like.
 
Hi! I'm trying to create a skript which, when wearing a player head, gives the same amount of protection as a diamond helmet. It seems simple and not very long, but I have been unable to figure out how to do so.

I've been looking for quite awhile now over the forums and other websites, only to come to a dead end. I think it might be possible through Tuske's Damage Modification (https://prnt.sc/tyof5b) but I am confused how to get it to work.

I have something as simple as this

on damage:
if player's helmet is a head:
clear damage armor
add 3 to damage armor

(Sorry, I do not know how to put it in the format of code, but yes my formatting is fine)

I have Tuske installed, and shows in the plugins list, but it seems like I am doing something wrong. Also, I am very unsure if my code is even close to being right. As of right now, all I want is if a player is wearing a player head, then that head will have the same damage protection as a normal diamond helmet.
Here is the error: https://prnt.sc/typ2gq

Thank you!
Try something like this. I havent test this so let me know
Code:
on damage of a player:
    victim is wearing an stone block
    set damage to damage - 1 #you can make your ecuation
#another example
on damage of a player:
    if victim is wearing an stone block:
        set damage to damage - 1 #you can make your ecuation
    else if victim is wearing an jungle leaf:
        set damage to damage - .2 #you can make your ecuation
references:
https://skriptlang.github.io/Skript/expressions.html#ExprAltitude
https://skriptlang.github.io/Skript/conditions.html#CondIsWearing
 
Status
Not open for further replies.