Jump to content
Sign in to follow this  
icfhoop

Adding sounds to a script

Recommended Posts

Hello all, I need a little guidance. I want to take a bombardment script and make it to where before each round hits the ground a sound play before it making it sound like an artillery shell in air. Here is the script:

;Nombre de coups

_v0=_this select 0

;Cible

_v1=_this select 1

;Rayon

_v2=_this select 2

;Cadence

_v3=_this select 3

;Type d'obus

_v4=_this select 4

mun="shell120"

? _v4==2:mun="smokeshellred"

? _v4==1:mun="smokeshell"

? _v4==3:mun="smokeshellgreen"

? _v4==105:mun="Sh_125_HE"

_cnt=0

_coord=getpos _v1

_tx=_coord select 0

_ty=_coord select 1

#loop

_cnt=_cnt+1

? _cnt>_v0:goto "end"

_x=random _v2

_y=random _v2

_z=random 1

_z2=random 1

? _z<.5:_x=-_x

? _z2<0.5:_y=-_y

_mine= mun createvehicle [_tx+_x,_ty+_y,-0.1]

_mine setdammage 1

~_v3

goto "loop"

#end

exit

Thanks .

Share this post


Link to post
Share on other sites

well you can make a sound folder and get the sound you want, convert to .ogg, put it in the sound folder and then in the script where you want the sound to play just add:

playsound "YourSound.ogg";

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×