Footstep sounds not scaling with character. [SOLVED].

Started by RetroJay, Thu 17/01/2013 05:14:00

Previous topic - Next topic

Khris

This is really weird.

What happens if you do something like:
Code: ags
  aFootstep.Play();
  Wait(40);
  AudioChannel*ac = aFootStep.Play();
  ac.Volume = 30;


Does that work?

(Also, if you're unhappy with the countless improvements and bugfixes and one weird bad thing we haven't fixed yet, just go back to 2.72. ;))

RetroJay

Hi Khris and Slasher.

Sorry.
I don't have a problem with 3.2.1.
I like what has been done with our beloved engine.
Call it 'Venting my frustrations' if you like.

Right, Khris.
The piece of script you gave me plays the footstep sound once, then a pause, then again but much quieter, which I assume is a good thing as it shows that the volume works.

The test that you uploaded for me worked flawlessly.
Also I was impressed as to how you made the sound pan from left to right and back again, depending on which side of the screen the character was on, very clever.

Would you be able to upload an editable version so I can view what you have done to make it all work please.

Many thanks.
Jay.

Khris

The panning is done by AGS, and all I did was assign the footstep sound to two frames of each loop, put a walkable area with min and max scaling in a room and walk.
That's it, so I could upload the source code, but there's no point; I didn't use any code except "player.ScaleVolume = true;"

Now that we've also established that you don't get automatic panning in your game, could you start a clean default game in 3.21 and test the footsteps again?
I'm guessing you're editing a game you've started in 2.72 and I'm wondering if this is the reason for your audio not doing what it's supposed to. Since my game works fine on your system, it has to be your game files that cause it.

RetroJay

#23
Hi Khris.

Tis me again. (I can already hear you groan.)

I have created a new test using 3.2.1 and the default template, on three different computers,
An XP machine, a Win7 machine and a Vista machine.

Surprise... Surprise the volume scaling on the footsteps or the panning doesn't work on any of them.
I have uploaded my new test, called 'Pixelated Little Pillock' for you to try, if you would be so kind.

Also, I started making this part of my game with 3.2.1. I didn't start it with 2.72.

Many Many Thanks.
Jay.

Khris

Just like with your other test game, I compiled and ran it: panning and scaling of the footsteps works just fine.

Just to recap: when you ran the game I uploaded, it worked, right? But whenever you create the game yourself, it doesn't work?
I'm at a loss here, sorry.

RetroJay

#25
Hi again, Khris.

1. Yes. The game you uploaded worked. (I wish to hell that I could make my game work.)
2. Yes. That's right. Whenever I create my game it doesn't work.

I have taken a while getting back to you cos I just got back from my mates house.
He has many computers and my game does not work on them either, XP, Win7, Vista, Win8 and ones before. (He works all day with comps.)

Khris.
Are you using some sort of 'Plugin' or 'Module' or a Beta version of AGS 3.2.1, that I am not aware of?
I downloaded my version of 3.2.1 from the AGS tab on the AGS website.
When I hover my mouse over the downloaded file it says 3.2.1.0.

If you still can't help, I will admit defeat with this.

Thanks for your help, Khris.
Jay.

Khris

Of course, that's the solution. So obvious in hindsight.
Since Character.ScaleVolume is part of the official version of AGS 3.21, but flat-out refuses to work, I'd never have guessed that it's a feature of the altered engine I'm using.

Which is Alan v. Drake's Draconion Edition:
Here's the thread: http://www.adventuregamestudio.co.uk/forums/index.php?topic=44502.0

Sorry for wasting both our time :(

RetroJay

Hi Khris.

No worries.
I'm glad we got there in the end. :)

Sound is working fine, now.

Thanks for all of your help.
Jay.


Slasher

Quote from: Khris on Tue 22/01/2013 09:02:54
Of course, that's the solution. So obvious in hindsight.
Since Character.ScaleVolume is part of the official version of AGS 3.21, but flat-out refuses to work, I'd never have guessed that it's a feature of the altered engine I'm using.

Which is Alan v. Drake's Draconion Edition:
Here's the thread: http://www.adventuregamestudio.co.uk/forums/index.php?topic=44502.0

Sorry for wasting both our time :(

Well, Character.ScaleVolume (3.2.1) is defaulted to false. It seems you have to set it to true.

I would have thought it would be defaulted as true.

As you say, perhaps it's not functioning properly  :-







Khris

I specifically said that I set it to true in my code when I tested it.
Also, in the engine's thread I linked to in the post you quoted, one of the listed features is: "AdjustVolumeWithScaling now works for real;"

SMF spam blocked by CleanTalk