#Why doesn’t it apply the effect to the entity?

1 messages · Page 1 of 1 (latest)

faint basalt
#
    player is holding a cake
    give player a mace named "frost staff"
    remove 1 cake from player's inventory

variables:
    {cooldown::%player%} = 0

on right click:
    if {cooldown::%player%} > now:
        set {_remaining} to difference between {cooldown::%player%} and now
        send action bar "&b&lCooldown: &f%{_remaining}%" to player
    else:
        player is holding a mace named "frost staff"
        shoot snowball from player
        set last spawned snowball's custom name to "iceball"
        set {cooldown::%player%} to now + 0 seconds

on damage:
    projectile exists
    projectile is a snowball
    projectile's custom name is "iceball"
    apply glowing to victim for 15 seconds
    
every second:
    loop all players:
        if {cooldown::%loop-player%} > now:
            set {_remaining} to difference between {cooldown::%loop-player%} and now
            send action bar "&b&lCooldown: &f%seconds of {_remaining}%&7" to loop-player
        else:
            clear {cooldown::%loop-player%}
            send action bar "" to loop-player ```
prime elbow
#

no idea. have you debugged to ensure this all works?

  1. Check all the conditions are passed
  2. check that snowballs still cause a damage tick in whatever version this is. Maybe use on projectile hit: instead
faint basalt
#

So if there is a way other than naming it

#

Please do share

faint basalt
#

Sorry abt the ping

prime elbow
#

you can add metadata to the snowball when you shoot

#

or NBT