Random Multi level Sound

Discussion about Included Addons

Random Multi level Sound

Postby wondeR » Fri May 29, 2009 6:06 pm

Hey guys,

Im not sure if this is the right place to be posting this, so if it is not I apologize.

A few clan mates and I have been setting up a GG server, and I was just wondering if it is possible to set up that when you multi level, that the sound that plays is a random one out of three or something.
We have set up random songs for when someone wins, but is it possible to do it for when someone multi levels?

If so, could you please let me know how I would go about doing this, and if not, thank you for your time.

Look forward to your response. Thanks.

~ |FDG| wondeR.
wondeR. ::Tasty Coma wifE//

Intel Q6600, Dual EVGA 8800 GTS G92, EVGA 780i, 4GB Crucial Ballistix, Sound Blaster Fatality Pro, Coolermaster Cosmos.
wondeR

Recruit
Recruit
User avatar
 
Posts: 1
Joined: Fri May 29, 2009 5:58 pm
Location: Brooklyn, NY
Steam Friends Name: wondeR. ::Tasty Coma wifE//

Re: Random Multi level Sound

Postby XE_ManUp » Thu Jun 11, 2009 6:04 am

Nope. Not at the current moment, unfortunately.
XE_ManUp

Site Admin
Site Admin
 
Posts: 662
Joined: Sat Sep 06, 2008 3:36 am

Postby Carbon16 » Wed Oct 27, 2010 3:55 pm

Hmmm, I take it this applies to all the other gungame sounds as well then ManUp? I was actually just looking for a way to randomize most of the sounds and I havent been having much luck, I realise this is an oldish thread, but should I assume this hasnt changed?
Carbon16

Private
Private
 
Posts: 23
Joined: Wed Mar 17, 2010 3:23 pm
Steam Friends Name: carbon16@telus.net

Postby XE_ManUp » Wed Oct 27, 2010 7:47 pm

Yes, as of the current point in time, randomizing of sounds is limited to certain sounds. I can't remember how I went about reading for random sounds, so I can't say whether or not this would be an easy change.
XE_ManUp

Site Admin
Site Admin
 
Posts: 662
Joined: Sat Sep 06, 2008 3:36 am

Re: Random Multi level Sound

Postby lqhnybear » Thu Oct 28, 2010 2:07 am

*****EDIT YES IT WORKS*****(Silly coders not knowing their own code. LOL j/k <3 you guys.)
;) Random sounds for everything.... sound familiar? lol

I think if I remember right from trying this before. If you put #Random..... never mind that was a long time ago. lol


I suggest some one try creating a sound.txt file and putting that in one of the fields they wish to attempt to have random sounds in

So if you wanted random multilevel sounds it look like this.
multilevel = "multilevelsongs.txt"


Then just make your sounds pak and go from there. I recommend testing it with a currently working soundpak you may have. I don't have time to do this myself or I would.

I know the game might not of been coded like this, but I've done similar things in the passed and to the surprise of the coders, it worked. LOL! (hense the #Random comment above)


You know what, screw it I'll try it right now on my demo server and post the results in a couple minutes.
*****EDIT YES IT WORKS*****(I can't believe no one has tried this before.)
HnyBear's WhoreHouse - 207.210.253.104:27015
Image
lqhnybear

Private 1st Class
Private 1st Class
User avatar
 
Posts: 133
Joined: Thu Oct 08, 2009 4:48 am
Location: North Bay Village, Fl

Postby satoon101 » Thu Oct 28, 2010 2:23 am

Yeah, it seems as if core/sound/__init__.py checks if the variable endswith .txt and if it does, it checks that the file exists and chooses a random sound listed in that file. Make sure each sound is on a separate line. It looks as though the these .txt files must be located in the servers ../cfg/gungame51/sound_packs/random_sound_files/ directory.

Satoon
satoon101

Site Admin
Site Admin
 
Posts: 1055
Joined: Thu Oct 09, 2008 4:27 pm

Postby XE_ManUp » Thu Oct 28, 2010 6:34 am

Damn...I forgot that I did it that way! I'm good! :D
XE_ManUp

Site Admin
Site Admin
 
Posts: 662
Joined: Sat Sep 06, 2008 3:36 am

Postby lqhnybear » Thu Oct 28, 2010 6:39 am

LOL no more whiskey for you ManUp!
HnyBear's WhoreHouse - 207.210.253.104:27015
Image
lqhnybear

Private 1st Class
Private 1st Class
User avatar
 
Posts: 133
Joined: Thu Oct 08, 2009 4:48 am
Location: North Bay Village, Fl

Postby Carbon16 » Thu Oct 28, 2010 7:03 am

Perfect, thanks guys :D
Carbon16

Private
Private
 
Posts: 23
Joined: Wed Mar 17, 2010 3:23 pm
Steam Friends Name: carbon16@telus.net

Re:

Postby XE_ManUp » Thu Oct 28, 2010 6:49 pm

lqhnybear wrote:LOL no more whiskey for you ManUp!

But whiskey drives my binges of innovation... :(

:D

...or is it the other way around?
XE_ManUp

Site Admin
Site Admin
 
Posts: 662
Joined: Sat Sep 06, 2008 3:36 am

Postby lqhnybear » Fri Oct 29, 2010 1:01 am

LOL

I did find out for some reason in certain fields using the text files, that the text files can't have any commented code. ie:
//----------------------------------------------------------------------------
// winner_sounds.txt -- Random winner sound file definitions.
//
// In the chosen soundpack file, "winner" MUST be set to "winner_sounds.txt"
// for this to work.
//
// All files are relative to "../cstrike/sound/".
//
// Example: gungame/winner.mp3 would be ../cstrike/sound/gungame/winner.mp3
//          on the server.
//
// Note: Any alteration of this file requires a server restart or a reload of
//       GunGame.
//----------------------------------------------------------------------------


my server kept trying to play
// on the server.
and
// GunGame.
as sound files. LOL
lqhnybear

Private 1st Class
Private 1st Class
User avatar
 
Posts: 133
Joined: Thu Oct 08, 2009 4:48 am
Location: North Bay Village, Fl

Re: Random Multi level Sound

Postby lqhnybear » Fri Oct 29, 2010 6:26 pm

Hate to keep coming to this thread. lol but.... I've noticed 2 minor problems with the sounds, at least if using them for TripleLevels

1. When a player TripleLevels and the song is triggered, it seems and other sound that play during the 10 second will cancel out the TripleLevel sound. I never noticed it when I was only using one sound file instead of mulitples.

2. For some reason all the sound files are download upon connect to the server and every time there is a TripleLevel it plays a different song. Personally I like it like this, but I know it wasn't intended to work this way. I myself would like to keep it like that on my server, but I believe other servers may want an option to do one random song per map.
HnyBear's WhoreHouse - 207.210.253.104:27015
Image
lqhnybear

Private 1st Class
Private 1st Class
User avatar
 
Posts: 133
Joined: Thu Oct 08, 2009 4:48 am
Location: North Bay Village, Fl

Re: Random Multi level Sound

Postby lqhnybear » Fri Nov 05, 2010 7:59 pm

Noticed something else as well. Again this is only tested on the Triple level sounds when using random sounds. It appears that at certain distances the audio doesn't trigger on all clients. So in other words if you're too far from the person who tripled then you don't hear the sound file. At least that's how it appears to be happening.

All I know for sure is that the sound files don't play 100% of the time and there are no errors given in console.


hmmm maybe I should move these posts into the 5.1 section as that's what I'm using. lol
HnyBear's WhoreHouse - 207.210.253.104:27015
Image
lqhnybear

Private 1st Class
Private 1st Class
User avatar
 
Posts: 133
Joined: Thu Oct 08, 2009 4:48 am
Location: North Bay Village, Fl

Re: Random Multi level Sound

Postby lqhnybear » Mon Nov 08, 2010 3:28 am

HnyBear's WhoreHouse - 207.210.253.104:27015
Image
lqhnybear

Private 1st Class
Private 1st Class
User avatar
 
Posts: 133
Joined: Thu Oct 08, 2009 4:48 am
Location: North Bay Village, Fl



Return to Included Addons

Who is online

Users browsing this forum: No registered users and 24 guests

cron