#Warden Sword
1 messages · Page 1 of 1 (latest)
uhhh
Thats tied to attacks which i dont know about
try: play sonic blast at player
ok thanks ill try
nope
doesnt work
@sacred plinth
I see you are active
could u help?
@acoustic tusk
Could u help with this please
Im fully stuck
@sudden glade
function raycastsonicboom(p: player, length: number, dmg: number):
set {_x} to 0
set {_l} to 1
loop {_length} times: #loops as many times as long as the length from the function input
add 1 to {_x}
add 0.27 to {_l}
set {_rg%{_x}%} to location {_l} meters infront of {_p}
set {_rg%{_x}%} to location 1.27 meters above {_rg%{_x}%} #aligns with where player is looking better
# all of the locations are saved as soon as the function is called, effects such as particles can be applied afterwards.
set {_x} to 0
loop {_length} times:
add 3 to {_x}
play sonic boom at {_rg%{_x}%} #change color or particle type
loop entities in radius 3 around {_rg%{_x}%}:
loop-entity is not {_p}
damage loop-entity by {_dmg}
loop blocks in radius 0.7 around {_rg%{_x}%}:
if loop-block is not tall grass, short grass, snow layer, tank or water:
stop
play sound "entity.warden.sonic_boom" with volume 2 at {_p}
could i have u friended?