#Damaging Loop-entity

1 messages · Page 1 of 1 (latest)

ancient island
#

why doesnt this damage loop-entity?? ```applescript
on right click:
if player is sneaking:
if player's held item is {sea}:
if difference between now and {seacds::%uuid of player%} is less than 4 minutes:
send action bar "&cWait %difference between 4 minutes and (difference between now and {seacds::%uuid of player%})% before you can use this ability again!"
else:
set {seacds::%uuid of player%} to now
if player's facing is north:
set {_direction} to north
if player's facing is south:
set {_direction} to south
if player's facing is east:
set {_direction} to east
if player's facing is west:
set {_direction} to west
set {_daggerLoc} to location 0.25 blocks above player
spawn armor stand at {_daggerLoc} with nbt from "{Marker:1b,Invisible:1b,ArmorItems:[{},{},{},{id:light_blue_stained_glass,tag:{CustomModelData:2},Count:1}],ArmorDropChances:[0f,0f,0f,0f],Small:1b}"
set {_dagger} to last spawned entity
set {thrown_dagger::%uuid of {_dagger}%::owner} to player
set {thrown_dagger::%uuid of {_dagger}%::direction} to {_direction}
add {_dagger} to {daggers::*}

every 1 tick:
loop {daggers::}:
set {_dagger} to loop-value
set {d} to loop-value
if {_dagger} is not alive:
remove {_dagger} from {daggers::
}
stop
set {_direction} to {thrown_dagger::%uuid of {_dagger}%::direction}
set {_l} to location 0.75 blocks infront of {_dagger}
teleport {_dagger} to {_l}
if block at {_dagger} is not air or grass block or short grass or tall grass or water or lava:
remove {_dagger} from {daggers::}
kill {_dagger}
stop
loop all entities in radius 0.5 around {_dagger}:
if loop-entity's gamemode is survival or adventure:
if loop-entity is not {_dagger}:
if loop-entity is not {thrown_dagger::%uuid of {_dagger}%::owner}:
if loop-entity's active item is shield:
stop
else:
damage loop-entity by 6
set {Damaged::%loop-entity%} to true
remove {_dagger} from {daggers::
}
kill {_dagger}
stop
else:
stop```

rapid schooner
#

have you debugged?
whats {d} for?

ancient island
#

rq 😭

ancient island
# rapid schooner have you debugged? whats `{d}` for?

so i debugged it, this works rn loop all entities in radius 0.5 around {_dagger}: broadcast "hi" if loop-entity's gamemode is survival or adventure: if loop-entity is not {_dagger}: if loop-entity is not {thrown_dagger::%uuid of {_dagger}%::owner}: if loop-entity's active item is shield: stop else: damage loop-entity by 6 set {Damaged::%loop-entity%} to true remove {_dagger} from {daggers::*} kill {_dagger} stop else: stop but if i broadcast "hi" anywhere under it doesnt

#

mb for ping idk if it pinged

rapid schooner
#

Try if any: gamemode of loop-entity is survival gamemode of loop-entity is adventure then:

ancient island
# rapid schooner Try ```if any: gamemode of loop-entity is survival gamemode of loop-entity i...

now i have vb every 1 tick: loop {daggers::*}: set {_dagger} to loop-value if {_dagger} is not alive: remove {_dagger} from {daggers::*} stop set {_direction} to {thrown_dagger::%uuid of {_dagger}%::direction} set {_l} to location 0.75 blocks infront of {_dagger} teleport {_dagger} to {_l} if block at {_dagger} is not air or grass block or short grass or tall grass or water or lava: remove {_dagger} from {daggers::*} kill {_dagger} stop loop all entities in radius 0.5 around {_dagger}: if loop-entity is not {_dagger}: if loop-entity is not {thrown_dagger::%uuid of {_dagger}%::owner}: if loop-entity's active item is shield: stop else: stop if any: gamemode of loop-entity is survival gamemode of loop-entity is adventure then: damage loop-entity by 6 set {Damaged::%loop-entity%} to true remove {_dagger} from {daggers::*} kill {_dagger} stop still wont damage them tho

rapid schooner
#

maybe a stop is being hit?

#

see which sections are run

ancient island
#

it bugs out at around the if any: every 1 tick: loop {daggers::*}: set {_dagger} to loop-value if {_dagger} is not alive: remove {_dagger} from {daggers::*} stop set {_direction} to {thrown_dagger::%uuid of {_dagger}%::direction} set {_l} to location 0.75 blocks infront of {_dagger} teleport {_dagger} to {_l} if block at {_dagger} is not air or grass block or short grass or tall grass or water or lava: remove {_dagger} from {daggers::*} kill {_dagger} stop loop all entities in radius 0.5 around {_dagger}: if loop-entity is not {_dagger}: if loop-entity is not {thrown_dagger::%uuid of {_dagger}%::owner}: if loop-entity's active item is shield: stop else: stop if any: gamemode of loop-entity is survival gamemode of loop-entity is adventure then: damage loop-entity by 6 set {Damaged::%loop-entity%} to true remove {_dagger} from {daggers::*} kill {_dagger} stop

rapid schooner
#

maybe gamemode is only for players

ancient island
#

maybe, should i just remove that?

rapid schooner
#

sure

ancient island
#

ayy it works