#why wont this loop work?
1 messages · Page 1 of 1 (latest)
on swap hand items:
if all:
{ability::%uuid of player%} = "&6ᴘʏʀᴏ"
{abilityTier::%uuid of player%} = 2
{ability1::%uuid of player%::cooldown} = "&aʀᴇᴀᴅʏ!"
player is not sneaking
player is not holding a totem of undying
then:
if target player is set:
if {trustList::%uuid of player%::*} does not contain name of target player:
cancel event
set {ability1::%uuid of player%::cooldown} to "&7ᴀᴄᴛɪᴠᴇ..."
play sound "block.respawn_anchor.set_spawn" with volume 5 at pitch 2 at player
send "&6ʏᴏᴜ ʜᴀᴠᴇ ᴜꜱᴇᴅ ᴍᴇᴀᴛᴇʀᴏ ꜱʜᴏᴡᴇʀ!" to player
loop 5 times: # 20 fireballs, one every 3 seconds
if target player is alive:
set {_aboveLoc} to location of target player
set {_aboveLoc} to block 10 above {_aboveLoc}
spawn 1 of fireball at {_aboveLoc} with nbt from "{ExplosionPower:1.3}"
set {_fireball} to last spawned entity
set {_vec} to vector(0, -10, -5) # straight down
push {_fireball} {_vec} at force 2
wait 60 ticks # 3 seconds
a vector straight down would have only a y component, so vector(0, y, 0)
. Maybe the target player expression fails because the player is no longer looking at them
I dont see why these conditionals cant be in the if all: as well
the player that activates the ability has to look at the player use the ability, and than the ability runs.
all the other abilties work fine with that
Well debug to find why your loop fails