PlayAmbientSound/Characters sounds

Started by Alynn, Tue 28/10/2003 01:46:59

Previous topic - Next topic

Alynn

Ok, I asked a question on how to make a sound get louder as you got closer to it. The answer I got wasn't quite what I wanted (although PlayAmbientSound works)...

Would it be possible to make all characters sounds that happen from their view animations play the same way? I have a character that is cutting down a tree, but his sound when the axe hits the tree can be heard loudly even when on the other side of the room (700 pixel scrolling room).

Would be good for footsteps of other characters as they walk around and what not... I'm sure you can see other applications...

Anyway... thats my suggestion...

Scummbuddy

#1
cant you run a check inside the room that always checks your x position and if its getting closer to the point thats resonating the sound, then the volume raises?
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Alynn

Quote from: Scummbuddy on Tue 28/10/2003 17:04:18
cant you run a check inside the room that always checks your x position and if its getting closer to the point thats resonating the sound, then the volume raises?

Not that I am aware of, as you assign the sound into the view of that character, unless I am missing a function that lets you increase/decrease the volume of character sounds

juncmodule

I requested something similiar to this a while back, it may be on the tracker, I'm not sure.

Basically just a PlaySoundEx(); type of command that allows you to pass the same parameters as PlayAmbientSound();.

Is there a character[].variable for view/frame sound hidden away somewhere? I know there isn't one in the help file. Perhaps that would be too difficult to implement.

Either way it looks like for now you may have to set up some scripting to do what you want. I don't think the frame sounds will work for what you are trying to do, at least not at the moment.

good luck,
-junc

Alynn

#4
Quote from: juncmodule on Tue 28/10/2003 17:34:46
I requested something similiar to this a while back, it may be on the tracker, I'm not sure.

Basically just a PlaySoundEx(); type of command that allows you to pass the same parameters as PlayAmbientSound();.

Is there a character[].variable for view/frame sound hidden away somewhere? I know there isn't one in the help file. Perhaps that would be too difficult to implement.

Either way it looks like for now you may have to set up some scripting to do what you want. I don't think the frame sounds will work for what you are trying to do, at least not at the moment.

good luck,
-junc

I dont have time right now but when I get home I'm going to try in the room's repeat_ex that
Code: ags

if ((character[1].loop==5) & (character[1].frame==6) {
  PlayAmbientSound(1, 0, 200, 520, 255);
  StopAmbientSound(1);
} 


Gonna see if it works (the logic seems right anyway.) EDIT: I will probably have to have a Wait(4); or something...

Pumaman

To get the effect you want, you'd have to use PlaySoundEx and SetChannelVolume to pull it off. I'll look into how easy it would be to provide X,Y co-ordinates to a normal PlaySound command.

Alynn

#6
Quote from: Alynn on Tue 28/10/2003 17:45:35
I dont have time right now but when I get home I'm going to try in the room's repeat_ex that
Code: ags

if ((character[1].loop==5) & (character[1].frame==6) {
  PlayAmbientSound(1, 0, 200, 520, 255);
  StopAmbientSound(1);
} 


Gonna see if it works (the logic seems right anyway.) EDIT: I will probably have to have a Wait(4); or something...

Just FYI, it works, but, not like I had hoped... Unfortunately the wait brings up the hourglass for that 1/20th of a second the program waits and my gui's gray out (making for a very ugly scene)... I'll look into PlaySoundEx

SMF spam blocked by CleanTalk