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?
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
this just chnages the walk view. not the talk view
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.
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.
Wow, that's a lot of run around when you could just use... this! ^_^
SetCharacterSpeechView (CHARID, int view)
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.
wow. so I just use :
SetCharacterSpeechView(Ego,1)?
superb
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.
Good point, I'll add a See Also reference from SetCharacterView.