#execute if entity @s[distance=..4] run particle crit ~ ~ ~
execute if entity @e[dx=0,type=#survivalplus:sentrytarget] positioned ~-0.99 ~-0.99 ~-0.99 if entity @e[dx=0,type=#survivalplus:sentrytarget] positioned as @s run function survivalplus:tools/trap/ballista/shoot
execute if block ~ ~ ~ #survivalplus:nobounce positioned ^ ^ ^.5 run function survivalplus:tools/trap/ballista/aim