Jump to content
Sign in to follow this  
vilas

how to make user action with sound playing ?

Recommended Posts

i used search forum , but search didnt give result

i am looking for way to have sirene sound turned on

how to make it ?

i made cfg sounds, i made class sirne_sound there

and i put in user actions

statement = "this animate [""policelight"", 1]; this say ""sirene_sound"" ";

Share this post


Link to post
Share on other sites

no, it doesnt work, i even checked ogg file, it was proper file, police lights i made (finallyyyyyyyy after so many retries) work for me, but no siren sound active, so finally i have animated police lightbar (not by script), but without any sound

Share this post


Link to post
Share on other sites

If you have configed the sound in cfgsounds, can you play it otherwise in the editor (inside a trigger for example) ?

Share this post


Link to post
Share on other sites

it works in meaning it works ONCE but i want loop, a constant sirene sound , repeating

is it possible to repeate sound without script, like we have engine sound

nevermind, i have done simple script (first time in my life)

topic can be closed or deleted, thanx , solved by script

while { _this animationphase "kogut_znika" >0}

do

{_this say "p85_police_siren"; Sleep 0.5;};

shame i was too lazy to read scripting language tutorials before

Edited by vilas

Share this post


Link to post
Share on other sites

try

cfgsounds
{
class sirene
name = "whoopwhoop"
...
};


cfgvehicles
{
bla bla
class UserAction
{
blabla
statement = "this animate [""policelight"", 1]; this say ""whoopwhoop"" "; 
};
};

Share this post


Link to post
Share on other sites

so you suggest name instead of class name, i will try it, by the way ,

heh, i am happy that after so many years finally i have learnt do police lightbars :) and they work :D

now testing them on my PC, soon hope to make updates

Edited by vilas

Share this post


Link to post
Share on other sites

so i will PM you , cause now i would need to add blue light to them :)

Share this post


Link to post
Share on other sites

Nice work DO

Any reason the light-bars cant be made as a separate addon that can be ATTACHTO any vehicle ?

Share this post


Link to post
Share on other sites
Any reason the light-bars cant be made as a separate addon that can be ATTACHTO any vehicle ?

yes, there is a reason, different bars on different cars:

http://www.furious.pl/furious2006-2011/img1/kia-ceed-policja03.jpg

http://foto.scigacz.pl/cache/imgs/_w750/gallery/aktualnosci/Alfy_Romeo_159_w_Policji_oczy_dookola_glowy/alfa_romeo_159_policja.jpg

Share this post


Link to post
Share on other sites

Thanks Vilas, but no, I didnt mean YOUR light bars / YOUR vehicles ...... I mean some future mod from someone else (like me).

The addon could be a CfgVehicle class, just a lightbar (no wheels etc, just some USERACTIONS that could be used by any "nearby vehicle" that its attached to, right ?

Share this post


Link to post
Share on other sites

Gnat, you can block the useraction.

_lb = _this select 0;

_no = nearestObjects [_lb,["man"],2]; (check for persons near to your lightbar)

_no1 = _no select 0; (getting the nearest one)

{....

start the animation script };

Otherway you get the name of object and set, that only the player of object can use the useraction.

@Vilas

I attach the lightbars with attachTo by the SUV's. The other cars are models with the lightbars. The lightflash are just simple "'#lightpoints". But it'S hard to drive at night^^

I try to find a way to attach the lightbar via script. So it's possbile to paint a VWGolf (config.cpp >> hiddenselection; hiddenselectiontextrue) and set the lightbar via script on top. So every guy can take the addon without any scriptcode in the description.txt.

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  

×