Help with speech.vox

Started by Elrich2k3, Sun 14/09/2003 20:46:26

Previous topic - Next topic

Elrich2k3

I have a character in my game called "Elrich" (Script name = "ELRICH")
I downloaded a random wav file and renamed it "ELRI1.wav" and then I got stumped... so I put one in the compiled folder, one in the game folder, and one in the AGS folder itself, and rebuilt the VOX file, then I did this.

DisplaySpeech (ELRICH, "&1 Hello!");

The wav file didn't play. What did I do wrong?
I should add, by the way, that I just started programming with this yesterday and have had no experience with C programming, but from what I have seen, it doesn't look too hard if you've had courses in BASICa and TIBASIC (don't know if that's what it's called, but it's the language used in TI-83+ calculators), which I have.

Edit: Another problem I just encountered. If I set speech to occur, then I place AFTER IT a Character Move, or a Move to New Room... the move/room occurs, and the speech doesn't.

Minimi

I don't know about about the first thing of the sound, because i never worked with speech, but for your second question, you should put between the move command and the show message command a wait command.

do it like this :

wait (30); (you can increase decrease the number to adjust the timelength

Elrich2k3

  Thanks, Minimi... haven't had a chance to see if I know what you meant yet, because I worked my way around the problem and finalized the game (just a tech-demo, feeling the program out) before you replied. I do still need speech.vox help though, other people.

 I learn best from examples (I just downloaded this program yesterday, and with no previous C experience, am now making my own GUI by looking at someone else's code and figuring out how it works. That's how I learned TI-Basic.)

Scorpiorus

QuoteI put one in the compiled folder, one in the game folder, and one in the AGS folder itself
You need to place it in the game folder only, then rebuid VOX files as usual.

Quote
DisplaySpeech (ELRICH, "&1 Hello!");

The wav file didn't play. What did I do wrong?
You mean it displays "hello" but doesn't play?
Have you tried play some other WAV files (via PlaySound() for example). Also check the sound setup (main menu - file - setup game...) Try different digital sound settings. Oh, and check for "Use speech pack if available" option to be ticked.

How it goes?

QuoteI learn best from examples (I just downloaded this program yesterday, and with no previous C experience, am now making my own GUI by looking at someone else's code and figuring out how it works. That's how I learned TI-Basic.)
The best way to learn, indeed!

Btw, welcome to the community!
Hope you like making adventure games in AGS. ;)

~Cheers

Elrich2k3

#4
I checked and rechecked, but nothing worked... so I made a quick one-room game and tossed a few midi, wav, and mp3s in it... and it worked fine. I must have messed up something in the script without knowing it, before I tried adding the speech.

Thanks.

Scorpiorus

Maybe it was SetVoiceMode(0)... :P

SetVoiceMode (int new_mode)

Changes whether voice speech is used with dialog lines. The default is on if the voice file is present, or off otherwise.
Valid values are:

0  no voice, text only
1  both voice and text
2  voice only, no text


Anyway I'm glad it works now.

~Cheers

SMF spam blocked by CleanTalk