Adding Agent Characters to your Application
If you are using Microsoft Office or Windows XP, you are already aware of the Animated characters that popup while you work or search. How about adding a silimar character to you own application?
Agent Character, typically .ACS files, is a compilation of various animations, and sometimes also carry speech capabilities using the Microsoft Speech API. While Agent Characters bundled with Microsoft office don’t have speech capabilities, Microsoft lists four characters Genie, Merlin, Peddy and Robby, speech capable and also downloadable at Microsoft site subject to End-User License Agreement.
You first require to add a “Microsoft Agent” control to your project. Once the control has been added you need to load a character.
Agent1.Characters.Load "Merlin", "C:\WINNT\msagent\chars\merlin.acs"
Once the character is loaded it can be made visible calling the Show method
Agent1.Characters.Character("Merlin").Show
Similarly it can be hidden by calling the Hide method
Agent1.Characters.Character("Merlin").Hide
The characters are compilation of a number of Animated clips, each carrying a unique name. The animations that are named Show and Hide are shown when the character first appears and when it hides respectively. RestPose is the animation that’s played when no other sequence is playing. These are some of the default Names that need to exist with each Agent Character to function properly.
The Character by default appears at the Top-Left corner of the screen. It can be made to move to any position of the screen by using the Move method passing X and the Y co-ordinates as parameter. Depending on the current position and the position to move to one of the four animations MoveRight, MoveLeft, MoveUp or MoveDown is played while moving the character to the given position. This method can also be called while the character is hidden.
Agent1.Characters.Character("Merlin").MoveTo 0, 0
The character can be made to look towards a specified location on screen giving X and Y co-ordinates as parameter to GestureAt method. This will cause one of the four animations GestureUp, GestureDown, GestureLeft or GestureRight to be played.
Agent1.Characters.Character("Merlin").GestureAt 500, 500
The animation Think is played when the Think method is called passing string as a parameter. This string is displayed in the balloon above the character.
Agent1.Characters.Character("Merlin").Think "Hey let me hide. I want to sleep"
And now the most useful feature of the Character, the Text to speech capability. The character reads out the string passed as parameter to the Speak method. The text is also shown in the balloon as the characters speaks it.
Agent1.Characters.Character("Merlin").Speak "I know how to speak. Amazed?"
The characters don’t like being idle so If you are not passing any activity for it, it keeps playing animations named “Idle*” (asterisk shown is for wildcard) while it’s idle.
The character can be made to play a particular animation by calling the Play method passing the animation name as parameter.
Agent1.Characters.Character("Genie").Play ("Congratulate")
The names of all the animations available with a particular character are available on runtime in AnimationNames collection. Listed below are the names of animation sequences for available with Merlin and Genie characters
![]() Character : Merlin |
|---|
| RestPose, Blink, Idle2_2, Idle2_1, Idle1_1, Idle1_3, Idle1_2, Idle1_4, Greet, Idle3_1, GestureUp, GestureDown, GestureLeft, GestureRight, Show, Hide, Hearing_4, Hearing_1, Hearing_2, Hearing_3, Alert, Explain, Processing, Thinking, Searching, Acknowledge, Wave, DontRecognize, Uncertain, Decline, Sad, StopListening, GetAttention, GetAttentionReturn, Idle3_2, Surprised, Congratulate_2, Reading, Announce, Read, ReadReturn, Writing, Write, WriteReturn, Congratulate, Confused, Suggest, MoveRight, MoveLeft, MoveUp, MoveDown, StartListening, WriteContinued, DoMagic1, DoMagic2, LookDown, LookDownBlink, LookDownReturn, LookLeft, LookLeftBlink, LookLeftReturn, LookRight, LookRightBlink, LookRightReturn, LookUp, LookUpBlink, LookUpReturn, ReadContinued, Pleased, GetAttentionContinued, Process, Search, Think |
![]() Character : Genie |
|---|
| RestPose, Blink, Idle1_4, Idle1_2, Idle1_1, Idle1_3, Idle3_1, Idle3_2, Idle2_2, Idle2_3, Show, Hide, GestureRight, GestureRightReturn, Announce, AnnounceReturn, GestureLeft, GestureLeftReturn, Acknowledge, Think, ThinkReturn, Pleased, PleasedReturn, Hear_4, Hear_1, Hear_2, Hear_3, Congratulate, CongratulateReturn, Decline, DeclineReturn, Confused, ConfusedReturn, DontRecognize, DontRecognizeReturn, StopListening, StopListeningReturn, Alert, AlertReturn, Sad, SadReturn, Explain, ExplainReturn, Wave, WaveReturn, GetAttention, GetAttentionReturn, Surprised, SurprisedReturn, Greet, Uncertain, UncertainReturn, GestureUp, GestureUpReturn, GestureDown, GestureDownReturn, GreetReturn, Processing, ProcessingReturn, Suggest, SuggestReturn, Idle1_6, Idle1_5, GlanceRight, GlanceLeft, Searching, SearchingReturn, MoveRight, MoveRightReturn, MoveLeft, MoveLeftReturn, MoveUp, MoveUpReturn, MoveDown, MoveDownReturn, Read, ReadReturn, Writing, WritingReturn, Reading, GlanceUp, GlanceDown, Idle3_1Return, ReadingReturn, Write, WriteReturn, StartListening, StartListeningReturn, LookDown, LookLeft, LookRight, LookUp, LookUpBlink, LookRightBlink, LookLeftBlink, LookDownBlink, LookDownReturn, LookLeftReturn, LookRightReturn, LookUpReturn, ReadContinued, WriteContinued, Idle2_1 |



Dear Sir,
Please advise me how to display change character window on which user can select one character from those avail on his pc.
I am using vb 6. i have speech recognition, character agent. i can display property sheet but i m unable display change character sheet. Thanx
Comment by Awan — February 7, 2008 @ 3:26 pm
sir…
Can you explain me how to make Merlin and Genie talk, but on this condition merlin ask to Genie and Genie answer merlin [ In the Visual Basic ]
Please sir…Thx before…
Comment by ramz — April 23, 2008 @ 6:06 am