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

ChocoAura

Member
Jul 3, 2019
38
0
6
24
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?
 
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?
Yes, you can check the cause, the attacker and the entity that died.
Examples:

Code:
on death:
    damage cause is fall:
        #action
Code:
on death:
    if attacker is a player:
        #action
Code:
on death of a player:
    #action
 
^^
That just on death damage is supposed to be death and if attacker is supposed to be if killer
It didn't work, is there a certain addon i need? There's no errors, but it just shows a regular death message.
 
Try:
code_language.skript:
on death: 
    victim is a player:
        damage was caused by a block explosion
        broadcast "Boom!"
 
Status
Not open for further replies.