SayBackground / Voice Speech / Text Speed Coordination? (SOLVED!)

Started by Play_Pretend, Sun 21/09/2008 14:04:25

Previous topic - Next topic

Play_Pretend

Hey all...I've got a problem with the SayBackground command and using voice speech together.  There's a character in the background who says things at random times, and I want the game to go on while it's talking, but stop the background text and voice speech if the main character starts talking.

I already found out that voice speech files won't play for SayBackground, and so I tried to compensate by just converting them to sound files instead, and using PlaySound right before the SB command.

The problem now is, that while my main character Say-ing anything does remove SayBackground text, the sound file of the bg character talking will keep playing anyways.

Also, sometimes the text hangs around a lot longer than the voice.  I tried setting it so that when the sound finished playing, it changes game.text_speed to a superhigh number to make the text instantly disappear, and then changing it immediately back to the game's regular text speed.  But apparently SayBackground ignores game text speed too?

Can anyone think of a good workaround for this, or tell me what I'm doing wrong?  Thanks!

Akatosh

Not much need for a workaround, it's all there (more or less).  ;)

- PlaySound(-1) will stop all sound files currently playing. If you want a less "brute" method, you could also force the background speech to only use channel 7 (for example) by replacing PlaySound(whatever) with PlaySoundEx(whatever,7) and inserting a StopChannel(7) at the appropiate location.

- You should be able remove background speech with a simple cInsertName.SayBackground("").

Play_Pretend

#2
Ahhh, okay...I think I was really close but was thinking backwards. :)  I just went through my entire object/hotspot/etc interaction for things that will be said  by the main character in that room, and plugged in a PlaySound(-1) before she starts talking at each one.

One more clarification, please...there's a part in the same room where I want to PlayAmbientSound, looping in the background, will PlaySound(-1) affect that too?

Thanks Akatosh! :)

EDIT:  Ah, okay, experimented myself, and no, PlaySound(-1) does not affect ambient room sounds, much to my relief.

And for curious others, I had to go to most of my SayBackground lines and use a game.text_speed command before each one to make it disappear faster, then another game.text_speed to put it back to normal as soon as the line was gone.  After a little tweaking, it looks perfectly natural, like the lines just disappear when they should.

Thanks again, problem solved!  ;D

SMF spam blocked by CleanTalk