home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


juckbox model with random tracks

by Garth on 05/26/2008 16:47, 14 messages, last message: 05/30/2008 14:18, 1069 views, last view: 04/25/2024 18:02

Hi (again :) )
I would like to put a juckbox in a handmade map. And i would like to make it play random songs like in the map with music but localized like mapsound.
I have already put my md3 model in place and I have tried to charge this in my map.cfg:
randomamtrack = (concatword "sounds/ambience/juckbox/" (+ 1 (rnd 31)) ".ogg")
mapsound randomamtrack
and then selected the good mapsound to my nex soundbox.
but it does't work :) because
music is dynamic whereas mapsound is static righ?
someone has a better idea to do that?

   Board Index   

#1: ..

by fhdshfkjconorfhsdkj on 05/26/2008 21:46

Basic rundown of the alias you defined:

1:concatword "sounds/ambience/juckbox/"
This is defining where the sounds live

2: (+ 1 (rnd 31)) ".ogg")
31 is the number of songs you have, and .ogg is the extension, so if yuo have mp3s, do .mp3

3. mapsound randomamtrack
The actual mapsound


Try this instead:

randomamtrack = (concatword "mapsound sounds/ambience/juckbox/" (+ 1 (rnd 31)) ".ogg")
randomamtrack

reply to this message

#2: ..

by scasd on 05/26/2008 23:43

too bad - there is no soundreset

reply to this message

#3: ..

by Garth on 05/27/2008 11:13

thx fhdshfkjconorfhsdkj
i don't understand why you tried to explain to me what i have done..I know what I was doing.
but your code will do nothing...
or explain to me..
because it will just past a randomname of a track and not a binding to a mapsound..

reply to this message

#4: Re: ..

by tman_elite on 05/28/2008 03:15, refers to #3

You'll prolly need to be in SP mode, then have (in the config):
level_trigger_1 = [randomamtrack]
Then place your model in the map using:
/newent mapmodel # 5 1
where # is the number of your model.
This will mean every time the trigger is touched it will execute /randomamtrack, which will make it play another song. I think.

reply to this message

#5: ..

by Garth on 05/29/2008 17:32

at least it will change track but it will not permit me to assign my track into a sound entity ..
anyone?

reply to this message

#6: Message censored by administrator

by ACCESS-GRANTED on 05/29/2008 17:34

#7: ..

by scasd on 05/29/2008 18:55

I would record one big .ogg file and just play them as repeating stream. It is currently not possible to play positioned sounds via random access.

Your map pack will be large by the way.

reply to this message

#8: Message censored by administrator

by ACCESS-GRANTED on 05/29/2008 19:24

#9: ..

by Quin on 05/29/2008 20:46

You could pull a flowtron and just teleport the guy around to exact replicas of the room (in your case, with different sounds playing in them).

reply to this message

#10: ..

by scasd on 05/29/2008 21:51

I think he wants to create a multiplayer map... correct me if I am wrong.

reply to this message

#11: ..

by Garth on 05/30/2008 11:54

MP or SP I don't mind
I just want to have a random track playing localized, like /music for the random but localized like mapsound. but yep I think for the moment the engine does'nt permit that..

reply to this message

#12: ..

by scasd on 05/30/2008 12:31

Yea, it is only possible to play random sounds for the whole map or a fixed track(s) localized as far as I remember.

reply to this message

#13: ..

by Garth on 05/30/2008 14:14

..

reply to this message

#14: ..

by Garth on 05/30/2008 14:18

lol sorry for this last post... I saw an addition question "3+8?"=> so easy! I did not even think a second, I answered while I wrote nothing...just a reflex lol

reply to this message

   Board Index   


Unvalidated accounts can only reply to the 'Permanent Threads' section!


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
53870199 visitors requested 71645401 pages
page created in 0.018 seconds using 10 queries
hosted by Boost Digital