Kill log due to skript 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 solved the fixed damage method in the thread below.
https://forums.skunity.com/threads/how-to-apply-fixed-damage.15305/
However, I cannot display the kill log. Specifically, the player who fired will be none.
This is Source.
Code:
on Death:
    if victim is player:
        broadcast "[&4KILL&f] %shooter% &c>&4>&f %victim%"

on projectile hit:
    projectile is arrow
    cancel event
    damage victim by 1 heart
    if victim is player:
        broadcast "[&eHIT&f] %shooter% &c>&4>&f %victim%"
        play "BLOCK_NOTE_BLOCK_BELL" to all players at volume 1

on Damage:
    if damage cause is entity:
        cancel event
The player who fired cannot be used in On Death, what should I do?

P.S: Skript 2.6.1 and Minecraft JE 1.17.
 
Change
Code:
damage victim by 1 heart
to
Code:
make shooter damage victim by 1 heart
 
Status
Not open for further replies.