1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Help with Damage Cause

Discussion in 'Skript' started by Glitch496, Jan 24, 2018.

Thread Status:
Not open for further replies.
  1. Glitch496

    Glitch496 New Member

    Joined:
    Jan 24, 2018
    Messages:
    9
    Likes Received:
    0
    Skript Version: Skript 2.2 (dev32d) released 12 days ago
    Skript Author: bensku
    Minecraft Version: 1.12

    Full Code:
    Code (Text):
    1.  
    2. on death of player:
    3.     if damage cause is entity:
    4.         if display name of entity is "&c[REDACTED]":
    5.             broadcast "test"
    6.  
    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.

     
  2. Best Answer:
    Post #3 by Wynnevir, Jan 24, 2018
  3. ChisleLP

    ChisleLP Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    789
    Likes Received:
    60
    What are you trying?

    maybe do you mean

    if attacker is entity (or player)?
     
  4. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    1,016
    Likes Received:
    62
    Entity isnt a valid cause. Use attack instead.
    Code (Skript):
    1. if damage cause is attack:
     
    • Winner Winner x 1
  5. Glitch496

    Glitch496 New Member

    Joined:
    Jan 24, 2018
    Messages:
    9
    Likes Received:
    0
    Essentially just trying to do some things when you get killed by a certain mob.

    Thank you, this worked. The new revised code for anyone who needs it:
    Code (Text):
    1.  
    2. on death of player:
    3.     if damage cause is attack:
    4.         if display name of attacker is "&c[REDACTED]":
    5.             broadcast "test"
    6.  
     
    • Friendly Friendly x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...