Inside3D!
     

trying to credit ppl but cant remember
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
ajay



Joined: 29 Oct 2004
Posts: 295
Location: Swindon, UK

PostPosted: Mon Mar 28, 2005 12:07 pm    Post subject: trying to credit ppl but cant remember Reply with quote

Although I'm a few months of finishing, I'm getting the creditation sorted for Lunkin. I'm using the music code below (- minus the music here stuff nonsense I replaced the "long winded different level music stuff of mine" with.
But I can't remember where I got it, and who wrote it:

void() musicplay =
{
music here stuff !
};

void() playmusic =
{
local entity music;

music = spawn();

music.nextthink = time + 1;
music.think = musicplay;
};


Ideas?
_________________
my site
Back to top
View user's profile Send private message MSN Messenger
Sajt



Joined: 16 Oct 2004
Posts: 1026

PostPosted: Mon Mar 28, 2005 11:41 pm    Post subject: Reply with quote

I'll help you. Replace the code with this.

void() musicplay =
{
sound (self, CHAN_VOICE, "music.wav", 1, ATTN_NONE);
};

voi() playmusic =
{
local entity music1, music2;

music1 = spawn ();
music2 = spawn ();

music1.origin = '-4096 -4096 -4096';
music2.origin = '4096 4096 4096';

music1.think = musicplay;
music2.think = musicplay;

music1.nextthink = time + 1.0;
music2.nextthink = time + 1.0;
};

If you do this, I'll let you credit nobody Smile It's a common method for doing sound. (You have two sound players in different extremities of the level. This makes it so it doesn't sound like the music is coming out of only one speaker when turning in a certain direction)

Actually, the common method is:

void() playmusic =
{
ambientsound ('-4096 -4096 -4096', "music.wav", 1, ATTN_NONE);
ambientsound ('4096 4096 4096', "music.wav", 1, ATTN_NONE);
};

But that will make the sound play right away. If that's what you want (i.e. you won't be able to change the track til the level changes), then you can use that. Also the music must be looping to use the ambientsound version.
_________________
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Back to top
View user's profile Send private message
RenegadeC



Joined: 15 Oct 2004
Posts: 370
Location: The freezing hell; Canada

PostPosted: Tue Mar 29, 2005 3:17 am    Post subject: Reply with quote

It's a shame the stereo sound hack method suppousedly doesn't work.

Record one channel as one .wav file, record the other channel as another .wav file .. play one wav at one side, and the other wav at the other end of the level.

It doesn't synch, although I'd like to try this for myself one day - especially in a 2D gameplay mod (I'll probably test it out using TAoV...)

So close Wink
Back to top
View user's profile Send private message AIM Address MSN Messenger
ajay



Joined: 29 Oct 2004
Posts: 295
Location: Swindon, UK

PostPosted: Sun Jun 12, 2005 4:09 pm    Post subject: Reply with quote

Thanks for the replies, on a different but connected note, and back to this bit of code:

void() musicplay =
{
music here stuff !
};

void() playmusic =
{
local entity music;

music = spawn();

music.nextthink = time + 1;
music.think = musicplay;
};


How could I turn it off?
_________________
my site
Back to top
View user's profile Send private message MSN Messenger
Wazat



Joined: 15 Oct 2004
Posts: 732
Location: Middle 'o the desert, USA

PostPosted: Sun Jun 12, 2005 6:35 pm    Post subject: Reply with quote

play a different sound (such as misc/null.wav) on the same entity and the same channel.
_________________
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.
Back to top
View user's profile Send private message MSN Messenger
Gilgamesh



Joined: 26 Oct 2004
Posts: 67
Location: Brazil

PostPosted: Mon Jun 13, 2005 12:10 pm    Post subject: Reply with quote

Wazat wrote:
play a different sound (such as misc/null.wav) on the same entity and the same channel.


IIRC, null.wav is a looping sound. I prefer to play out beloved r_exp3.wav with volume 0, it works Smile
_________________
#EOP
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Wazat



Joined: 15 Oct 2004
Posts: 732
Location: Middle 'o the desert, USA

PostPosted: Mon Jun 13, 2005 3:51 pm    Post subject: Reply with quote

It's looping? The sound quake uses to stop other sounds is looping?

/me ponders what drunken orgy over at ID software spawned that decision...
_________________
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.
Back to top
View user's profile Send private message MSN Messenger
Gilgamesh



Joined: 26 Oct 2004
Posts: 67
Location: Brazil

PostPosted: Mon Jun 13, 2005 3:59 pm    Post subject: Reply with quote

Wazat wrote:
It's looping? The sound quake uses to stop other sounds is looping?

/me ponders what drunken orgy over at ID software spawned that decision...


Or i may be wrong (and the place where a saw it too)...
_________________
#EOP
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Dr. Shadowborg
Inside3D Staff


Joined: 16 Oct 2004
Posts: 726

PostPosted: Mon Jun 13, 2005 4:19 pm    Post subject: Reply with quote

Wazat wrote:
It's looping? The sound quake uses to stop other sounds is looping?

/me ponders what drunken orgy over at ID software spawned that decision...


Well, look at it this way, if you ever had to stop an ambientsound (Which only accepts loops), It'd be real handy to have. =P
_________________
"Roboto suggests Plasma Bazooka."
Back to top
View user's profile Send private message
FrikaC
Site Admin


Joined: 08 Oct 2004
Posts: 947

PostPosted: Wed Jun 15, 2005 12:21 am    Post subject: Reply with quote

But you can't change an ambientsound once spawned....
Back to top
View user's profile Send private message Send e-mail
ajay



Joined: 29 Oct 2004
Posts: 295
Location: Swindon, UK

PostPosted: Wed Jun 15, 2005 7:20 am    Post subject: Reply with quote

Which is what I've found.....
_________________
my site
Back to top
View user's profile Send private message MSN Messenger
FrikaC
Site Admin


Joined: 08 Oct 2004
Posts: 947

PostPosted: Wed Jun 15, 2005 7:52 am    Post subject: Reply with quote

Behind the sofa along with a half eaten bag of Fritos....
Back to top
View user's profile Send private message Send e-mail
ajay



Joined: 29 Oct 2004
Posts: 295
Location: Swindon, UK

PostPosted: Wed Jun 15, 2005 9:54 am    Post subject: Reply with quote

.. and the lost city of atlantis, lord lucan and shergar...

it's a big bloody sofa
_________________
my site
Back to top
View user's profile Send private message MSN Messenger
Dr. Shadowborg
Inside3D Staff


Joined: 16 Oct 2004
Posts: 726

PostPosted: Wed Jun 15, 2005 3:41 pm    Post subject: Reply with quote

FrikaC wrote:
But you can't change an ambientsound once spawned....


Which is why null.wav being looped is so damn funny. Smile
_________________
"Roboto suggests Plasma Bazooka."
Back to top
View user's profile Send private message
Gilgamesh



Joined: 26 Oct 2004
Posts: 67
Location: Brazil

PostPosted: Wed Jun 15, 2005 4:01 pm    Post subject: Reply with quote

Dr. Shadowborg wrote:
FrikaC wrote:
But you can't change an ambientsound once spawned....


Which is why null.wav being looped is so damn funny. Smile


I know what is the purpose: you can use it to create an ambientsound for quiet places! Yes, that is it. If you want a sound of frogs, there is one for it. If you want wind, there is another one. If you want no sound at all, you use this.

NEXT!
_________________
#EOP
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group