Forum

> > CS2D > Scripts > env_sound
Forums overviewCS2D overview Scripts overviewLog in to reply

English env_sound

14 replies
To the start Previous 1 Next To the start

old env_sound

Marcell
Super User Off Offline

Quote
How can i start env_sound by lua?:O
For me not works by trigger.. i don't know why..

old Re: env_sound

EngiN33R
Moderator Off Offline

Quote
The console command for a sound on the whole map is cs2d cmd sv_sound, a sound for a specific player - cs2d cmd sv_sound2. You could use them in a parse function.

old Re: env_sound

Marcell
Super User Off Offline

Quote
i am want use env_sound.. because this play on area not on all map...
so pleease help me:)

old Re: env_sound

EngiN33R
Moderator Off Offline

Quote
user Alistaire pretty much nailed it. If that doesn't work, I guess you could use one of the custom sound3 functions.

old Re: env_sound

Marcell
Super User Off Offline

Quote
i tried but, not works... the sound file is ogg so should to use...

old Re: env_sound

EngiN33R
Moderator Off Offline

Quote
user Marcell has written
i tried but, not works... the sound file is ogg so should to use...


Show us how you use it, code-wise.

old Re: env_sound

Marcell
Super User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
addhook("serveraction" ,"sact22")
function sact22(id, act)
if(act==2) then
menu(id, "DJ Music, Play")
end
end
addhook("menu", "menus2")
function menus2(id, tit, sel)
if(tit=="DJ Music") then
if(sel==1) then
parse("trigger 155");
end
end
end

old Re: env_sound

EngiN33R
Moderator Off Offline

Quote
Well, nothing is wrong with the code as far as I can tell. Double-check the entity data - it may lack a name, or the sound may be corrupted.

old Re: env_sound

Marcell
Super User Off Offline

Quote
sound is not corrupt because, i tested with sv_sound and with that works...
so maybe the use button(trigger) ..

old Re: env_sound

EngiN33R
Moderator Off Offline

Quote
I'm not sure what you mean by button(trigger), but your error is very strange. Is the entity's name specified and correct? Try that whatever you want to try, I guess.

old Re: env_sound

Marcell
Super User Off Offline

Quote
Tomorrow i give a screenshoot, but now i go to sleep, goodnight and thanks for help

old Re: env_sound

WinterPwnd
User Off Offline

Quote
user curt1996 has written
hmm, i'm mapper, so maybe try trigger 'trigger delay'

mapper? no sry for the offtopic, i was allso gona suggest the parse('trigger <etilityname>') but nvm if it didnt work idk.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview