English env_sound

14 replies
Goto Page
To the start Previous 1 Next To the start
27.02.12 09:52:16 pm
Up
Marcell
Super User
Offline Off
How can i start env_sound by lua?:O
For me not works by trigger.. i don't know why..
CS2DArchive - Version Database www.CS2DArchive.com - WebHosting: www.BroHosting.eu
27.02.12 09:59:42 pm
Up
curt1996
User
Offline Off
hmm, i'm mapper, so maybe try trigger 'trigger delay'
27.02.12 10:00:30 pm
Up
Anders4000
User
Offline Off
user curt1996 has written:
hmm, i'm mapper, so maybe try trigger 'trigger delay'

He wants it executed from lua. (:
27.02.12 10:00:45 pm
Up
EngiN33R
Moderator
Offline Off
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.
I code, therefore I exist.
27.02.12 10:05:00 pm
Up
Marcell
Super User
Offline Off
i am want use env_sound.. because this play on area not on all map...
so pleease help me:)
CS2DArchive - Version Database www.CS2DArchive.com - WebHosting: www.BroHosting.eu
27.02.12 10:05:28 pm
Up
Alistaire
User
Offline Off
parse('trigger yourentity')
IMG:http://i.imgur.com/5zhwOTP.png
27.02.12 10:17:02 pm
Up
EngiN33R
Moderator
Offline Off
user Alistaire pretty much nailed it. If that doesn't work, I guess you could use one of the custom sound3 functions.
I code, therefore I exist.
27.02.12 10:20:56 pm
Up
Marcell
Super User
Offline Off
i tried but, not works... the sound file is ogg so should to use...
CS2DArchive - Version Database www.CS2DArchive.com - WebHosting: www.BroHosting.eu
27.02.12 10:31:06 pm
Up
EngiN33R
Moderator
Offline Off
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.
I code, therefore I exist.
27.02.12 10:36:08 pm
Up
Marcell
Super User
Offline Off
Code:
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
CS2DArchive - Version Database www.CS2DArchive.com - WebHosting: www.BroHosting.eu
27.02.12 10:38:39 pm
Up
EngiN33R
Moderator
Offline Off
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.
I code, therefore I exist.
27.02.12 10:40:40 pm
Up
Marcell
Super User
Offline Off
sound is not corrupt because, i tested with sv_sound and with that works...
so maybe the use button(trigger) ..
CS2DArchive - Version Database www.CS2DArchive.com - WebHosting: www.BroHosting.eu
27.02.12 10:48:33 pm
Up
EngiN33R
Moderator
Offline Off
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.
I code, therefore I exist.
27.02.12 10:49:46 pm
Up
Marcell
Super User
Offline Off
Tomorrow i give a screenshoot, but now i go to sleep, goodnight and thanks for help
CS2DArchive - Version Database www.CS2DArchive.com - WebHosting: www.BroHosting.eu
27.02.12 10:54:04 pm
Up
WinterPwnd
User
Offline Off
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.
Is the w33d on the show real?
To the start Previous 1 Next To the start