set talk view?

Started by Sam., Fri 18/06/2004 16:38:21

Previous topic - Next topic

Sam.

in my game i need the main character to answer a mobile phone. i want him to talk on it as a talk view but can't figure out how to change just the talk view. is this possible?
Bye bye thankyou I love you.

Qwerty

#1
I'm a beginner in ags, but I can guess ;)

First make a view, where character is speaking in the phone.

Then modify view with: SetCharacterView (character_script_name, view_number);
And then release it with: ReleaseCharacterView (character_script_name);

Any help?

Or just wait for post from guy with bigger brains ;D

Sam.

this just chnages the walk view. not the talk view
Bye bye thankyou I love you.

Qwerty

Oops.

SetCharacterView(EGO,12);
AnimateCharacter(EGO,0,0,0);
while(character[EGO].animating) Wait(1);
ReleaseCharacterView(EGO);

That is from AGS help, try if this helps.

Ashen

#4
You should be able to set it using:

character[CHARID].talkviewÃ,  = The character's talking view number minus 1

So, for example:

character[EGO].talkview = 4; //Where the phone view is 5
DisplaySpeech (EGO, "Hello?");
DisplaySpeech (PHONE, "Sorry, wrong number.");
DisplaySpeech (EGO, "Don't mention it, happens all the time.");
character[EGO].talkview = 3; //Where normal talking view is 4
DisplaySpeech (EGO, "What an idiot.");

EDIT: Or, as Kinoko says, use SetCharacterSpeechView(). I was looking for it to be called SetCharacterTalkView(), since that's what the variable's called, and totally missed it. In fairness, I just got new contact lenses, and my eyes are sore.
I know what you're thinking ... Don't think that.

Kinoko

Wow, that's a lot of run around when you could just use... this! ^_^

SetCharacterSpeechView (CHARID, int view)


Scorpiorus

#6
Yeah, use the character[CHARID].talkview variable or SetCharacterSpeechView(charid, view) function.

What I'd like to point out is that there is only a single 'see also' reference to that function (it's under SetCharacterBlinkView). I think it could be a good idea to add one under the SetCharacterView.

Sam.

wow. so I just use :
SetCharacterSpeechView(Ego,1)?
superb
Bye bye thankyou I love you.

Scorpiorus

#8
Yeah, originally there was only one way to alter the talking view via the character[].talkview variable but since the version 2.53 an appropriate function was added.

Quote from: Ashen on Fri 18/06/2004 17:15:54EDIT: Or, as Kinoko says, use SetCharacterSpeechView(). I was looking for it to be called SetCharacterTalkView(), since that's what the variable's called, and totally missed it. In fairness, I just got new contact lenses, and my eyes are sore.
That's another reason why I think the reference to SetCharacterSpeechView should be propagated. Or maybe also add an alias - SetCharacterTalkView()? Since that's what the talking view refers to as in the characters pane.

Pumaman

Good point, I'll add a See Also reference from SetCharacterView.

SMF spam blocked by CleanTalk