OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: ThEoNaNdOnLy on 04 Dec 2004, 22:03:29

Title: sound in script
Post by: ThEoNaNdOnLy on 04 Dec 2004, 22:03:29

hello

i have a cutscene where a sniper is watching an american soldier, and i have the cutscene all done right and mary. but i dont know what to type into the script to make a gunshot sound. the sniper does not actually shott (i couldnt figure out of be botherd to figure it out. so all that happens is half way through the script it says

"officer setdammage 2", now, just before that happens, the camera looks at the sniper, then zooms close to his eye, and that is the point in time that i want to hear a nice loud gunshot. but i dont know what to type.

would it be something like

"sniper playsound "gunshot" or something?

someone please help  ;D

Guy
Title: Re:sound in script
Post by: bored_onion on 04 Dec 2004, 22:08:23
i think this needs a stringtable - i think
you need to call one of the ofp sounds if you want an exact replica

or you could record yourself firing a sniper and play that sound

or you could download a similar sound effect and use that

but i think stringtables are the best way - not quite sure how to use them though... :P
Title: Re:sound in script
Post by: ThEoNaNdOnLy on 04 Dec 2004, 22:13:56
ok could you just tell me the command to call the sound

e.g. this playsound "bang"

(if there is one)

and could you tell me where i could find a list of the sounds on opf.


Guy


 ;D
Title: Re:sound in script
Post by: ThEoNaNdOnLy on 04 Dec 2004, 22:56:28
i just need the gunshot sounds, i want the m21 sound, but hell if there are the voices on the list too then ill have it  ;D

guy

plz reply fast i can only do this tonight i have coursework to do tomoz
Title: Re:sound in script
Post by: Triggerhappy on 05 Dec 2004, 00:35:52
if you know the name of the m21 that the game reads, ex: JAM_m21 or whatever, you can just have him fire:

sniper fire ["m21","single"]

syntax and effectiveness not garunteed, but should work for what you want
Title: Re:sound in script
Post by: General Barron on 05 Dec 2004, 02:16:08
Looking in BIS's commented config files, I see the path to the sound for the m21 is this:

Weapons\m21

I think if you define a new sound, and put that as the file for the sound in your description.ext, than you might get the BIS m21 sound. If that doesn't work, try:

\Weapons\m21

Now, if you don't know how to define sounds in your description.ext, or play them in your scripts/triggers, then I suggest you search the ed depot and read Bloodmixers sound tutorial.
Title: Re:sound in script
Post by: The-Architect on 08 Dec 2004, 22:43:45
Just record it and then play it back where you want it. As long as your recordings ok, it'll sound fine.
Title: Re:sound in script
Post by: ThEoNeAnDoNlY on 09 Dec 2004, 21:52:26
wow this is confusing?

ok i just want him to shoot dont care about making the sound now, too hard, just want him to shoot one round, dont care where it goes.

Guy
Title: Re:sound in script
Post by: 456820 on 21 Dec 2004, 16:14:26
you could put [] exec "scriptname.sqs" in your cam script with a trigger snyced with a soldier with an m21 and in the script have it say (i think its) "sniperguy do firetarget nameoftarget" then in like a second tell it to stop not sure how. but with that trigger in the condition field put scriptname so when that script is called throught the cam script it will make a sniper shoot a different target for 1 second or wateva you put in then he will cease fire that might work try it