Lip sync won't work when DisplaySpeech (); message is diplayed.

Started by Nine Toes, Mon 26/01/2004 02:39:53

Previous topic - Next topic

Nine Toes

I've made my own custom inventory GUI, it's very similar to the default one that comes with AGS (a background, an inventory window, a look button, an interact button, an OK button, and an up and down button).  I've assigned all the buttons, and made sure their functions were properly in place, but my only problem is, when I test the game, and I click on the GUI to bring up the inventory window, and I still get the default inventory window, instead of my custom window... I even deleted the one that came in AGS...

So, how do I make it so that my custom window will come up, instead of AGS's default inventory window?
Watch, I just killed this topic...

00jon00

I had the same problem, so I kept the origanal Inventory GUI, and just changed what it looked like.

Nine Toes

#2
Hey, I like your avatar!

Sorry for wasting bandwidth, but I had to log off for a while... I already beat you to the punch...

I browsed through the global script, and found there was an area which you could use to add your own personal inventory GUI.  It says right in the script: "function: inventory interaction"... something to the effect of that.  So I solved my problem and yours, Jon.  :)

But now I have a new problem that I noticed...

I have a function that will display certain global messages as speech.  Well, it does what it's supposed to, except for one thing, the player character's lips won't sync with the speech being spoken.  How can I get the character's lips to move when I have the game programmed to display a global message as his speech?

Here's the script:
function inventory22_a() {
 // script for inventory22: Use inventory on this item
if (character[GetPlayerCharacter()].activeinv == 15) {
LoseInventory(22);
LoseInventory(15);
AddInventory(25);
DisplaySpeech(JIM,"The flashlight works now.");}
else DisplaySpeech(JIM,"That's not going to work.");
SetCursorMode (6);
Watch, I just killed this topic...

strazer

Reading your script, I take it you are talking about a normal DisplaySpeech command in scripts? I think global messages are a different thing.

If you are, I use it frequently and it works like a charm. Which version of AGS are you using?

Nine Toes

#4
I have v.2.60.450.

I don't know... it's funny... I could have swore it worked just fine before... but now it doesn't.

What answers can you give me?
Watch, I just killed this topic...


Nine Toes

#6
 :oWHOA!  My mistake, it isn't a global message being displayed, it's just a normal display speech command being displayed... (duh, what the hell was I thinking?)

In that case, I still don't know what to do. (sorry) :-[
Watch, I just killed this topic...

Paper Carnival

Well, Display Speech is buggy when a default inventory is on. To fix that, I hide the gui, make the player speak, then bring the gui up again

Nine Toes

#8
Can you show me an example of how you do it?

I modified the script to this:
function inventory15_a() {
 // script for inventory15: Use inventory on this item
if (character[GetPlayerCharacter()].activeinv == 22) {
 LoseInventory(22);
 LoseInventory(15);
 AddInventory(25);
 GUIOff (INVENTORY);
 DisplaySpeech(JIM,"The flashlight works now.");}
 else DisplaySpeech(JIM,"That's not going to work.");
 GUIOn (INVENTORY);
 SetCursorMode (6);

That didn't do the trick, nothing changed at all.  So I figured, "maybe it's not working because the GUIon/GUIoff commands are in the wrong position".  So I tried this:

function inventory15_a() {
 // script for inventory15: Use inventory on this item
if (character[GetPlayerCharacter()].activeinv == 22) {
 GUIOff (INVENTORY);
 LoseInventory(22);
 LoseInventory(15);
 AddInventory(25);
 DisplaySpeech(JIM,"The flashlight works now.");}
 else DisplaySpeech(JIM,"That's not going to work.");
 SetCursorMode (6);
 GUIOn (INVENTORY);

I ran that and I got an error message.
Watch, I just killed this topic...

Scorpiorus

Try to put Wait(1) command after both GUIOff(..) and GUIOn(...) functions :P How goes?

Nine Toes

function inventory15_a() {
 // script for inventory15: Use inventory on this item
if (character[GetPlayerCharacter()].activeinv == 22) {
 LoseInventory(22);
 LoseInventory(15);
 AddInventory(25);
 GUIOff (INVENTORY);
 Wait (1);
 DisplaySpeech(JIM,"The flashlight works now.");}
 else DisplaySpeech(JIM,"That's not going to work.");
 GUIOn (INVENTORY);
 Wait (1);
 SetCursorMode (6);

Nope, still it does nothing differently.

Maybe I could put these messages as global messages, and then display them as speech.  Maybe that would fix the problem...
Watch, I just killed this topic...

Scorpiorus

What if you change the INVENTORY GUI visible property to Normal and GUIoff it at game_start?

QuoteWell, it does what it's supposed to, except for one thing, the player character's lips won't sync with the speech being spoken. How can I get the character's lips to move when I have the game programmed to display a global message as his speech?
btw, can you elabarate a bit more on how it's unsync, is the animation not played at all or?

EDIT: what speech style are you using, sierra portrait?

Nine Toes

Yes, the lip sync animation won't play at all.

Umm... I'm not sure what the style I'm using is called.  No portraits, just the character itself is talking with the words being displayed above his head.

I'm not sure how it would help if I were to put GUIoff (Inventory); under game_start... but I'll give it a try.
Watch, I just killed this topic...

Pumaman

Be careful with your if statements - the GUIOff is currently only getting called if activeinv is 22, whereas it is getting switched back on all the time.

If you temporarily turn off the lip sync option, does the talking animation play normally or does that not work either?

SMF spam blocked by CleanTalk