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.

death cause

Discussion in 'Skript' started by ChocoAura, Aug 2, 2019.

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

    ChocoAura Member

    Joined:
    Jul 3, 2019
    Messages:
    38
    Likes Received:
    0
    Hello, I'd like to know if it's possible to use the "cause is" code for an on death event. Is that possible? If so, how?
     
  2. GiorgixPRO

    GiorgixPRO Member

    Joined:
    Jul 29, 2017
    Messages:
    44
    Likes Received:
    0
    Yes, you can check the cause, the attacker and the entity that died.
    Examples:

    Code (Text):
    1. on death:
    2.     damage cause is fall:
    3.         #action
    Code (Text):
    1. on death:
    2.     if attacker is a player:
    3.         #action
    Code (Text):
    1. on death of a player:
    2.     #action
     
  3. malia

    malia Well-Known Member

    Joined:
    Jul 24, 2019
    Messages:
    314
    Likes Received:
    21
    ^^
    That just on death damage is supposed to be death and if attacker is supposed to be if killer
     
  4. ChocoAura

    ChocoAura Member

    Joined:
    Jul 3, 2019
    Messages:
    38
    Likes Received:
    0
    It didn't work, is there a certain addon i need? There's no errors, but it just shows a regular death message.
     
  5. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    Try:
    Code (Skript):
    1.  
    2. on death:
    3.     victim is a player:
    4.         damage was caused by a block explosion
    5.         broadcast "Boom!"
     
  6. malia

    malia Well-Known Member

    Joined:
    Jul 24, 2019
    Messages:
    314
    Likes Received:
    21
    Code (Text):
    1. on death:
    2.     if death cause is void:
    3.         set death message to "%victim% fell into the void"
     
Thread Status:
Not open for further replies.

Share This Page

Loading...