How to get the attacker?

  • 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 community!

    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.

pepper82

Member
Jan 26, 2017
272
1
18
Hi all,
assuming a player casts spells like fireball or something like that and the victim dies because of a fireball.
How would you get the attacker in the "on damage" or "on death" event, because default it's empty?
 
No,
basically I would like to know HOW to set the attacker with Skript. Because when you shoot a fireball oder wither skull with some self scripted effects there will be no attacker in the "on damage" event.
 
You can use metadata to do that. You can set a metadata value to the fireball (you can set whoever shot it) and then check the metadata of the projectile to get the shooter in the damage event.
 
  • Like
Reactions: pepper82
Status
Not open for further replies.