Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Knox on Tue 25/08/2009 20:57:41

Title: Pausing one single frame of a speech view (SOLVED)
Post by: Knox on Tue 25/08/2009 20:57:41
Hi,

Ive been trying different solutions and I cant seem to get what I want without doing a "hack". Im sure there is a much simpler way of doing what I need done. Ok, here we go:

All I need is once a character finishes saying something to the main character, I want him to smile, but hold the smile for 4 seconds...and nothing else is displayed (and everything else is locked/paused).

Right now what I have is my normal speech view and a "smile" speech view...just 3 frames of my main character smiling. What I tried doing was in my dialog simply changing the speechview to my smile view...it works fine, but since the line he says while smiling is very short ("Great!"), that smile view only gets displayed for like 1 second.

I tried gamepause...Wait(80)...putting a delay, etc...

I tried looking in the manual for some sort of "display for x seconds then disappear" kind of deal, without luck.

A little nudge in the right direction is all I would need :)
Title: Re: Pausing one single frame of a speech view
Post by: ddq on Tue 25/08/2009 21:10:29
You could use Character.LockViewFrame(int View, int Loop, int Frame), then do the Wait(80), and then use Character.UnlockView().

This probably won't work perfectly, but it's just how I do it. You might want to wait for a more experienced user to post and then we can both learn!  ;)
Title: Re: Pausing one single frame of a speech view
Post by: Joseph on Tue 25/08/2009 21:42:20
I would like to know too how to do this.
Title: Re: Pausing one single frame of a speech view
Post by: Knox on Tue 25/08/2009 21:44:59
Hi DDQ,

I tried that, it does work, however, since Im using SierraStyle Dialog, when it locks the view specified, its shrunk down and next to the player (thinking its LucasArts Style I imagine).

What I need is get a specific SierraStyle's portrait frame to lock at the same place the speech animation was running ("SierraStyle Potrait Location" in "General Settings" is set to BasedOnCharacterPosition).

Right now with the lockViewFrame, it shrinks the portrait down small, and moves it next to the character's body.
Title: Re: Pausing one single frame of a speech view
Post by: Khris on Wed 26/08/2009 07:30:38
I've never used Sierra speech style, but you could try setting the smile frame's delay to 80 in the view editor.
Title: Re: Pausing one single frame of a speech view
Post by: Knox on Wed 26/08/2009 12:05:47
Hey Khris,

Thats a good idea...I tried that, unfortunatly, it seems the portrait is displayed for a time that is "set" by the length of text that the player is saying...as in, if I have a huge monologue, the portrait will be animiated in loop mode for an "estimate" time that the text is in length. Doh!

Ill keep trying stuff out and let you know what I come up with. Thanks though :)
Title: Re: Pausing one single frame of a speech view
Post by: Vince Twelve on Wed 26/08/2009 15:17:55
I haven't tested this (I also have never used Sierra speech style), but could you just have cChar.Say("                                                              "); with a ton of spaces in there?
Title: Re: Pausing one single frame of a speech view
Post by: Akatosh on Wed 26/08/2009 16:46:27
If I recall correctly, there's also some way to adjust how the game determines how long a line of text stays onscreen; there's some variable you can manipulate during run-time, but I'm at a loss as to what it's called. If I don't recall this from some sort of AGS-themed fever dream, that is.

Anyway, if the var is real, just multiply it by four, make the character smile and say great, then set it back.
Title: Re: Pausing one single frame of a speech view
Post by: Scavenger on Wed 26/08/2009 19:06:22
I think it's this one?

http://www.adventuregamestudio.co.uk/manual/Game.TextReadingSpeed.htm

or this?

http://www.adventuregamestudio.co.uk/manual/Game.MinimumTextDisplayTimeMs.htm

It's a good idea you have there, too :3
Title: Re: Pausing one single frame of a speech view
Post by: Akatosh on Wed 26/08/2009 19:33:18
Yeah, one of these. The latter (Game.MinimumTextDisplayTimeMs) is probably the one you want. Briefly setting it to 4000 should work just fine.
Title: Re: Pausing one single frame of a speech view
Post by: Knox on Thu 27/08/2009 12:06:04
These are all very good ideas.

When I get home tonight I will try them out and let you know what happens.

Thanks for your help, I appreciate it. ;D
Title: Re: Pausing one single frame of a speech view (SOLVED)
Post by: Knox on Fri 28/08/2009 03:32:01
Hi,

This works perfectly...exactly what I needed.

Thanks a lot guys :)