Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: dikla on Fri 21/05/2004 20:41:01

Title: image while talking
Post by: dikla on Fri 21/05/2004 20:41:01
i have 2 kind of dialogs (each for certain event but both at the same script) and i want while talking to a chacrcter on the phone his image will appear (not before) and than disapear at the end of both converations.
thx
dikla
Title: Re: image while talking
Post by: Skio on Fri 21/05/2004 21:03:55
I think you'll have to be more specific. Post all the effects you want to achieve step-by-step and a more detailed account of the scripts.

However, if I have understood correctly, using the "Sierra style" dialog option (in the General Settings pane) will possibly help you.
Title: Re: image while talking
Post by: dikla on Fri 21/05/2004 21:17:21
when my hero talks on the phone i want the image of the character she is talking to will apear. (his face in the top left of the screen). i have two types of dialog. one is when she has an item and one when she dosent. (i have a script for both conversations). i want the image of the character to apear just befor the first "hello" and disapear as soon as the last option is used.
i want it to be an option for both chocen dialogs.
thx dikla
Title: Re: image while talking
Post by: viktor on Fri 21/05/2004 21:22:55
Ok I'm no this so corect me if I'm wrong.
You could make it so that when the character uses the phone he is transported in to new room (Which would hawe both characters that will talk). Then when he hangs up he is transported back to the previous room.
Title: Re: image while talking
Post by: Skio on Fri 21/05/2004 21:29:09
I think that the "sierra style" option will indeed help you.

If you want this effect ONLY for this part of the game you can change the speech style wtith the "SetSpeechStyle (new_style)" command in the game.

Example: SetSpeechStyle (SPEECH_SIERRA);    // just before the phone scene
               SetSpeechStyle (SPEECH_LUCASARTS);   // when the scene finishes

The only issue is that I don't know if you also want the image of the character on the other end of the phone line to appear. If you don't, I'm afraid the above won't help.
Title: Re: image while talking
Post by: dikla on Fri 21/05/2004 21:39:44
viktor: thx but it is not what i need.
skio: the problem is like you were afraid it wont work.
thx both.
dikla
Title: Re: image while talking
Post by: Scorpiorus on Fri 21/05/2004 22:38:45
Well, if you want the other man to be displayed in a sierra style while the player in lucasarts-style you can switch between these modes with a help of the dialog_request() function:

main global script:
//main global script

function dialog_request(int value) {

if (value==1) SetSpeechStyle(SPEECH_SIERRA);
else if (value==2) SetSpeechStyle(SPEECH_LUCASARTS);
}

now you need to organize your dialog scripts this way:
...
@3
run-script 1
ego: hello
run-script 2
man: hey
man: blah
run-script 1
ego: blah
...
...

So basically you put the run-script 1 when you need a sierra speech (image at the top left corner) and run-script 2 for the lucasArts style.

But don't forget to set up talking views for both characters. They also need to be in the same room. You can make the other character to start in the same room where the player will call him but set his x co-ordinate to a negative value (this way he won't be visible on the screen).

Title: Re: image while talking
Post by: dikla on Sat 22/05/2004 12:45:31
dear mr. scorpious.
i did what you told me and what i see was that when the doc character talks i see his LINES in the left top of the screen like i wanted it. the problem is that what i want was the FACE of the doctor appears at the left top corner not only his words.
can you fix it for me? (because if i set minus coordinates i dont see him and if i set the right coordinats i see him before the conversation when the room loaded of course).
also i want his face to disapear by the end of the conversation.
thnks a lot.
dikla
Title: Re: image while talking
Post by: Scorpiorus on Sat 22/05/2004 15:46:28
If you see the lines that is already good. What you have to do is to create a view with the doctor (closeup portrait?) image and set it as his talking view (see characters pane). In that case the talking view is displayed next to the lines.
Title: Re: image while talking
Post by: dikla on Sat 22/05/2004 15:57:32
i did it before its already ready with talking view before you told me but if i set its coordinate to minus i dont see it and if i check up the room number (10) he apperas right at the begining when she enter the room befor she is dialing (remember the hotspot dialing script)? i want him to show right when the dialog start and end when the dialog ends.
Title: Re: image while talking
Post by: Scorpiorus on Sat 22/05/2004 16:17:03
So do you see his talking view at all or you don't? Because if you set up his talking view that image must appear when he is responding (not just the lines).

I believe there is no way built-in AGS to display his talkign view all the time during the dialog (not just when he is responding).

A workaround for this would be to temporary change his normal view to that talking view as well and place him righ at the top left corner.

just before the RunDialog() command:

ChangeCharacterView(DOC, talkingview);
character[DOC].x = 50; //should be tweaked of course
character[DOC].y = 50; //should be tweaked of course
Title: Re: image while talking
Post by: dikla on Sat 22/05/2004 16:25:18
you are miracle worker.
thx dikla (of course it is working!)