#Warden Sword

1 messages · Page 1 of 1 (latest)

sudden glade
#

Does someone know how to make a sword shoot a warden blast when i rightclick with a sword?

  if player is holding diamond sword named "Warden Sword":
    #I dont know how to do the rest ;/ ```
misty kindle
#

Thats tied to attacks which i dont know about

#

try: play sonic blast at player

sudden glade
#

ok thanks ill try

sudden glade
#

nope

#

doesnt work

#

@sacred plinth

#

I see you are active

#

could u help?

#

@acoustic tusk

#

Could u help with this please

#

Im fully stuck

sick estuary
#

@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}
sudden glade
#

OMG

#

W

#

WHAT

#

@sick estuary thank you so much

sick estuary
#

ill send u the other part in a sec

#

np

sudden glade
#

could i have u friended?