#I need Help Playing a sound when I shoot a snowball.

1 messages ยท Page 1 of 1 (latest)

gray locust
#

Heres the chunk of my code that needs this function:

#

execute console command "run at %player% run playsound minecraft:entity.warden.sonic_charge ambient @a[distance=..10] ~ ~ ~ 1 1"
wait 1 second
execute console command "run at %player% run playsound minecraft:entity.warden.sonic_boom ambient @a[distance=..10] ~ ~ ~ 1 1"
make the player shoot an snowball
wait 5 tick

brisk crypt
#

definitely dont use console commands

#

skript has a built in sound function

#

you should pretty much never use console commands

#
gray locust
#

oh shi

#

thanks gng

brisk crypt
#

your welcome

#

my advice is to pretty much always google or check the docs BEFORE you post a queston

#

99.9999999999% of the time someone has asked the same question before and gotten a good answer

#

or its in the docs

gray locust
#

i dnt think its working

brisk crypt
#

send your full code

#

and are you using the current skript version?

brisk crypt
#

play sound "minecraft.sound"

gray locust
#

wait 2 ticks
play sound "entity.warden.attack_impact" at volume 3 at pitch 1 to player
execute console command "execute at %player% run particle minecraft:sonic_boom ~ ~1 ~"
apply speed to player for 30 seconds
execute console command "execute at %player% run particle minecraft:sonic_boom ~ ~1 ~"
play sound "entity.warden.sonic_charge" at volume 2 at pitch 0 to player
wait 1 second
play sound "minecraft:entity.warden.sonic_boom" with volume 2 with pitch 0 at ~ ~ ~
make the player shoot an snowball
wait 5 tick
execute console command "execute at %player% run particle minecraft:sonic_boom ~ ~1 ~"
wait 1 tick
execute console command "execute at %player% run particle minecraft:sonic_boom ~ ~1 ~"
set {EquipShard::%player's uuid%.beam.lastUsed} to now

brisk crypt
#

why are you switching from console commands to effects

#

just use effects

#

also using "wait __ second" is just better

#

it might be because your saying with instead of at

#

there are no errors on other lines and the other lines use at

#

just a theory

brisk crypt
gray locust
#

i know to use threes it jst sent weird

#

im using the 2 different ones bc i was testing which worked

brisk crypt
#

can you send the event too?

#

the whole code

#

its hard to tell from just "wait 2 ticks" and on

royal heron
#

graphic

gray locust
#

too long to send

brisk crypt
royal heron
#

umm can we vc rq

brisk crypt
royal heron
#

im trying to learn something

brisk crypt
royal heron
#

alright

#

talk to me threw dms

gray locust
#

how tf do i send at a file ๐Ÿ˜ญ ๐Ÿ™ i am new to all ts

brisk crypt
#

i dont mean the entire skript just the part that contains the event / command / whatever

gray locust
#

on sneak toggle:
if difference between now and {EquipShard::%player's uuid%.beam.lastUsed} is less than 3 seconds:
if {EquipShard::%player%.cooldowntime} is 0:
send action bar "๐Ÿฅ Power is Drained" to player
set {EquipShard::%player%.cooldowntime} to 1
wait 3 seconds
send action bar "๐Ÿฅ Power is Charged" to player
wait 1 second
set {EquipShard::%player%.cooldowntime} to 0
else:

#

if player is sneaking:
if {EquipShard::%player%.shards} is 6:
wait 2 ticks
play sound "entity.warden.attack_impact" at volume 3 at pitch 1 to player
execute console command "execute at %player% run particle minecraft:sonic_boom ~ ~1 ~"
apply speed to player for 30 seconds
execute console command "execute at %player% run particle minecraft:sonic_boom ~ ~1 ~"
play sound "minecraft:entity.warden.sonic_boom" with volume 2 with pitch 0 at ~ ~ ~
wait 1 second
play sound "minecraft:entity.warden.sonic_boom" with volume 2 with pitch 0 at ~ ~ ~
make the player shoot an snowball
wait 5 tick
execute console command "execute at %player% run particle minecraft:sonic_boom ~ ~1 ~"
wait 1 tick
execute console command "execute at %player% run particle minecraft:sonic_boom ~ ~1 ~"
set {EquipShard::%player's uuid%.beam.lastUsed} to now
on projectile hit:
if projectile is snowball:
damage victim by 6 hearts
on shoot:
if projectile is an snowball:
play sonic boom at projectile
wait 1 tick
play sonic boom at projectile
wait 1 tick
play sonic boom at projectile
wait 1 tick
play sonic boom at projectile
play sonic boom at projectile
wait 1 tick
play sonic boom at projectile
wait 1 tick
play sonic boom at projectile
wait 1 tick
play sonic boom at projectile
wait 1 tick
play sonic boom at projectile
wait 1 tick
play sonic boom at projectile
wait 1 tick
play sonic boom at projectile

#

split it up. easier ๐Ÿ˜ญ

brisk crypt
#

alright do something for me to test

gray locust
#

kay?

#

do what?

brisk crypt
#

my bad

#

make a command

#

set it to trigger the part thats erroring

#

and see if it works

gray locust
#

ima keep it fr, i jst started coding yesterday. idfk what ts means, ive been getting help from my other plugin dev who is teaching me. hes gone for a couple days and he told me to go to this discord server for help

reef wren
#

whats wrong

#

do u just need to be able to play sound

gray locust
#

i need a sound to play at a specific location and it plays in a radius of 30.

#

that way if your there you hear it

#

and if your not close enough you dont

reef wren
#

ig just change the volume probbably

gray locust
#

๐Ÿ˜ญ

#

it is not dependent on vol

reef wren
#

does the play sound thing work for u tho

gray locust
#

it plays for everyone

#

or it plays for only you

reef wren
#

i have an idea

gray locust
#

i want it to play for everyone within 30 blocks of you so that ppl 10k blocks out dont hear it

reef wren
#

ok

#

do this

gray locust
#

mhm?

reef wren
#

loop all players in radius 30 of blahblah:
play sound "blahblah" to loop-player

gray locust
#

idk if that will work

#

but ig ill try

brisk crypt
#

sorry for being mia ive been blowing up w dms

reef wren
gray locust
#

i lit started for my first time yesterday

#

ofc its gonna look sloppy and bad

#

how tf does ts work

reef wren
#

remove the %

#

indent the play sound line

reef wren
gray locust
reef wren
#
loop all players in radius 30 of player:
  play sound "entity.warden.sonic_boom" to loop-player
#

btw u dont need the minecraft: part

gray locust
#

ts scripting is pmo TVT

reef wren
#

send ur code

#

playe isnt a word

gray locust
#

on sneak toggle:
if difference between now and {EquipShard::%player's uuid%.beam.lastUsed} is less than 3 seconds:
if {EquipShard::%player%.cooldowntime} is 0:
send action bar "๐Ÿฅ Power is Drained" to player
set {EquipShard::%player%.cooldowntime} to 1
wait 3 seconds
send action bar "๐Ÿฅ Power is Charged" to player
wait 1 second
set {EquipShard::%player%.cooldowntime} to 0
else:

  if player is sneaking: 
  if {EquipShard::%player%.shards} is 6:
     wait 2 ticks
     play sound "entity.warden.attack_impact" at volume 3 at pitch 1 to player
     execute console command "execute at %player% run particle minecraft:sonic_boom ~ ~1 ~"
     apply speed to player for 30 seconds
     execute console command "execute at %player% run particle minecraft:sonic_boom ~ ~1 ~"
     loop all players in radius 30 of playe:
     loop all players in radius 30 of player:
     play sound "entity.warden.sonic_boom" to loop-player
     play sound "minecraft:entity.warden.sonic_boom" with volume 2 with pitch 0 at ~ ~ ~
     make the player shoot an snowball
     wait 5 tick
     execute console command "execute at %player% run particle minecraft:sonic_boom ~ ~1 ~"
     wait 1 tick
     execute console command "execute at %player% run particle minecraft:sonic_boom ~ ~1 ~"
     set {EquipShard::%player's uuid%.beam.lastUsed} to now
#

on projectile hit:
if projectile is snowball:
damage victim by 6 hearts
on shoot:
if projectile is an snowball:
play sonic boom at projectile
wait 1 tick
play sonic boom at projectile
wait 1 tick
play sonic boom at projectile
wait 1 tick
play sonic boom at projectile
play sonic boom at projectile
wait 1 tick
play sonic boom at projectile
wait 1 tick
play sonic boom at projectile
wait 1 tick
play sonic boom at projectile
wait 1 tick
play sonic boom at projectile
wait 1 tick
play sonic boom at projectile
wait 1 tick
play sonic boom at projectile

reef wren
#

u still didnt indent

#

loop all players in radius 30 of player:
play sound "entity.warden.sonic_boom" to loop-player

gray locust
#

this good?

reef wren
#

yeah

#

buyt try it first

gray locust
#

it works

#

but how to i change

#

pitch and vol

#

on it

reef wren
#

with volume 1 with pitch 1

#

after the sound

#

play sound "a" with volume 1 with pitch 1 at location

brisk crypt
#

glad its working

gray locust
#

I think it works

#

i jst someone to test it with to see if they hear

twilit pivot
#

are u fucking dense

#

you just solved it close this thread

brisk crypt
#

he might need more help

#

no need to be hostile

twilit pivot
#

ur right

#

everybody starts somehwere eh!

brisk crypt
#

exactly

gray locust
#

dont know why you came in here all rude

brisk crypt
#

believe me i get frustrated too

#

but gotta remember ur roots

#

we were all there once

twilit pivot
twilit pivot
#

googles always a good solution

reef wren
#

i agree with raid ngl

reef wren
#

most of these solutions are on google

#

look it up first before posting!

reef wren
#

leads to a faster answer 99% of the time

gray locust
twilit pivot
#

bro are u serious

twilit pivot
#

this thread wouldnt have been made if u just googled it

brisk crypt
#

okay dude cmon dont be a dick

reef wren
#
#

oh wow!

gray locust
#

your still being quite rude bro, there really is no reason to

reef wren
#

this one gives some good insight

twilit pivot
gray locust
#

why would you even come in here jst to be a dick?

twilit pivot
#

i dont have time to waste on dense people like you

#

Goodbye

reef wren
gray locust
#

and im dense ๐Ÿคฆโ€โ™‚๏ธ

#

oh well, thanks for the help beans and graphicality

#

have a good day or night

twilit pivot