Speech Not Working

Started by DazJ, Fri 23/08/2013 00:29:06

Previous topic - Next topic

DazJ

I'm using AGS 3.2.1.

Here's one that has me completely baffled.

I've got this in my script:

JOAN.SayBackground("&1 Hello.");

I've also got JOAN1.OGG in the Speech folder. It simply won't play. The text appears but no sound. I've tried it in MP3, OGG, WAV, neither work.

I've Compiled and tried, I've also tested it by running normally but still no luck.

Any ideas?

Slasher

#1
If within the Room and normal speaking.

1) In the Room script you use the full character Name.

If you wish to play JOAN1 when cJoan talks you should script:

Code: ags
cJOAN.SayBackground("&1 Hello, my name is Joan.");
   // That's if JOAN is cJOAN.

Also mp3 takes order over ogg I believe.

MOD:  # CODE not working.
Edited by mod: Fixed. The current tags are [code=ags][/code] since the forum upgrade. I'm not sure but I think AGA once mentioned that it's hard to implement it as the old [code][/code] or something like that.

Hope this helps.

Khris

DazJ:
You have apparently given your character the script name of "JOAN". This is a bad idea (also since AGS uses allcaps stuff for the constants holding the IDs). You should stick to the naming convention and name the character "cJoan". If you do that, it should work.

(According to the manual, if a Character has the script name of cAbcd, AGS looks for voice files named ABCD???.???
I don't know whether AGS simply disregards the first letter (and OAN1.ogg would work) or whether it's looking for a "c" or whatever else it's doing.)

DazJ

Those suggestions still don't work I'm afraid.

Does it make any difference that the code is placed in repeatedly_execute_always() for that room? It is triggered after the timer completes. The timer is working fine because the character still displays the speech, but the sound doesn't play.

Here's the actual code:

Code: ags

if (IsTimerExpired(1)) {
  cJoan.SayBackground("&1 Hello.");
  SetTimer(1, 300);
}


Khris

I was already in the middle of testing this when I finally noticed what the problem is:

Voice speech doesn't work with SayBackground. You have to import the speech file like you would a standard audio file and play it right before/after calling SayBackground.

DazJ

Thanks Khris, that's what I'd been doing in the meantime too :)

Slasher

Blast.. Just remembered that which is something I had to do in a previous game :(



SMF spam blocked by CleanTalk