Solved How to apply fixed 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 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.

Crysta1221

Member
Mar 16, 2022
4
0
1
24
I'm making a PvP game right now.
I want to deal fixed damage of 1 heart when the player attacks with an arrow and hits.
However, I don't know how to deal fixed Heart 1 damage when the arrow hits the player.
Could you tell me about it?
Also, please tell me how to eliminate damage other than arrows.
Thank you.
[doublepost=1647451758,1647424367][/doublepost]P.S: Minecraft JE 1.17
Skript 2.6.1
SkRayFall 1.9
 
I tried it but it didn't work.
Below is my code.
Code:
on projectile hit:
projectile is arrow
damage victim by 1 heart
The amount of damage is not equivalent to one fixed heart, and hitting an arrow from a distance will increase the damage.
Also, I want to make it impossible to attack other than the attack with the bow and arrow, and when hitting the player with the attack with the bow and arrow, I want to fix the damage to one heart regardless of whether it is far or near.
The damage is 1 fixed heart, but in the above script, the damage will be increased by 1 heart.
 
I tried it but it didn't work.
Below is my code.
Code:
on projectile hit:
projectile is arrow
damage victim by 1 heart
The amount of damage is not equivalent to one fixed heart, and hitting an arrow from a distance will increase the damage.
Also, I want to make it impossible to attack other than the attack with the bow and arrow, and when hitting the player with the attack with the bow and arrow, I want to fix the damage to one heart regardless of whether it is far or near.
The damage is 1 fixed heart, but in the above script, the damage will be increased by 1 heart.
you can cancel the event using Skript-Reflect and then damage the victim.

Code:
on projectile hit:
    projectile is arrow
    set {_v} to target
    set {_p} to projectile
    cancel event
    {_v}.damage(1, {_p})
 
you can cancel the event using Skript-Reflect and then damage the victim.

Code:
on projectile hit:
    projectile is arrow
    set {_v} to target
    set {_p} to projectile
    cancel event
    {_v}.damage(1, {_p})
It doesn't work but it was solved.
Thank You!
 
Status
Not open for further replies.