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 explosion kill?

Discussion in 'Skript' started by Zyxed, May 22, 2021.

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

    Supporter

    Joined:
    May 17, 2021
    Messages:
    23
    Likes Received:
    1
    Okay so I made a really simple skript. When you throw egg it creates an explosion. Now the problem is, when you throw the egg on player and the player dies, the dead is caused by an explosion. How I can make it to be player kill. So player who throw the egg will get a kill.

    Code:
    Code (Text):
    1. on projectile hit:
    2.     event-projectile is egg
    3.     wait 10 ticks
    4.     create a safe explosion of force 2 at event-location


     
  2. Best Answer:
    Post #10 by Minecoll_YT, May 23, 2021
  3. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    Cancel the damage event and use shooter to give the attacker the kill
     
  4. Zyxed

    Supporter

    Joined:
    May 17, 2021
    Messages:
    23
    Likes Received:
    1
    How? Can you give write it for me?:emoji_slight_smile:
     
  5. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    Not sure if the fake explosion event does damage
    Code (Text):
    1. on projectile hit:
    2.     if event-projectile is an egg:
    3.         create a safe explosion of force 2 at event-location
    4.         send "you killed %player%" to shooter
    5.         send "you got killed by %shooter%" to player
    try smth like that
     
  6. Zyxed

    Supporter

    Joined:
    May 17, 2021
    Messages:
    23
    Likes Received:
    1
    Thanks! I'll try this tomorrow!
     
  7. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    If it doesn't work just post it here, if it does please mark this thread as solved
     
  8. Zyxed

    Supporter

    Joined:
    May 17, 2021
    Messages:
    23
    Likes Received:
    1
    Yeah
    --- Double Post Merged, May 23, 2021, Original Post Date: May 22, 2021 ---
    Didn't work. It gives me error:
    upload_2021-5-23_19-54-32.png

    what does this mean?
     
  9. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    Code (Text):
    1. on damage of player:
    2.     if projectile = egg:
    3.         kill the victim
    4.         if victim is not shooter:
    5.             send "you got killed by %attacker%" to victim
    6.             send "you killed %victim%" to attacker
    7.          else:
    8.              send "you killed urself, great job"
    There might be an/some error/s because of whitespace/space
     
  10. Zyxed

    Supporter

    Joined:
    May 17, 2021
    Messages:
    23
    Likes Received:
    1
    Thanks for quick reply! Now it says this
    upload_2021-5-23_20-39-55.png
     
  11. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    Just add a "to victim"
     
Thread Status:
Not open for further replies.

Share This Page

Loading...