I have a problem with a custom fireball that i'm making, the fireball seems unable to activate on damage event
Code:
the fireball is thrown like this:
Code:
the on damage event is not being reached when the fireball hits an entityon 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 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