Fireball with custom damage and explosion

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

descreetOP

Member
Jan 2, 2024
11
2
3
I have a problem with a custom fireball that i'm making, the fireball seems unable to activate on damage event
Code:
on damage:
if projectile is set:
send "%projectile%" to attacker
if projectile is a fireball:

set {_holding} to item amount of attacker's tool
if attacker is holding {_holding} of {CustomItem::BloodBall}:
cancel event
damage victim by 10 hearts
create a safe explosion of force 4 at victim's location
the on damage event is not being reached when the fireball hits an entity
the fireball is thrown like this:
on right click:
if clicked block isn't set:
set {_holding} to item amount of player's tool
if player is holding {_holding} of {CustomItem::BloodBall}:
if {BloodBall::cooldown::%uuid of player%} is 0:
set {loc.%uuid of player%} to block above block above block forward player's location
spawn fireball at {loc.%uuid of player%}
set {_e} to last spawned entity
push {_e} in direction of player with force 0.5