Solved Help with Damage Cause

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

Glitch496

New Member
Jan 24, 2018
9
0
1
Skript Version: Skript 2.2 (dev32d) released 12 days ago
Skript Author: bensku
Minecraft Version: 1.12

Full Code:
Code:
on death of player:
    if damage cause is entity:
        if display name of entity is "&c[REDACTED]":
            broadcast "test"

I looked at the documentation and everything, and I couldn't get it to work, even though it looks just fine.

Errors on Reload:
No errors

Console Errors: (if applicable)
No errors

Addons using (including versions):
None

Troubleshooting:

Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? There was really nothing I could do

Thank you for your time. Any help is appreciated.
 
What are you trying?

maybe do you mean

if attacker is entity (or player)?
Essentially just trying to do some things when you get killed by a certain mob.

Entity isnt a valid cause. Use attack instead.
code_language.skript:
if damage cause is attack:
Thank you, this worked. The new revised code for anyone who needs it:
Code:
on death of player:
    if damage cause is attack:
        if display name of attacker is "&c[REDACTED]":
            broadcast "test"
 
Status
Not open for further replies.