Part 2 - Loading a Character

Part 2 - Loading a Character

A Character file defines what your agent will look like, and all the character animations are stored there. Before you can begin programming for MS Agent you need to specify what character file to open.

     ‘Create a Character Object
     Private Merlin As IAgentCtlCharacterEx

     ‘Load the Default Character by not supplying
     ‘an ACS file
     MSAgent.Characters.Load "Merlin", _ 

     ‘Set the Merlin object to our new character.
     Set Merlin = MSAgent.Characters("Merlin")

Microsoft Agent 2.0 has the ability to allow the user to enter in a default character to use with programs. If you want to load the default character the code looks just about the same.

Instead of doing this:

     MSAgent.Characters.Load "Merlin", “c:\windows\msagent\chars\merlin.acs”

We just need to leave out the path and the default will be used, like this:

     MSAgent.Characters.Load "DefaultCharacter"

To show your character on the screen do the following:


You can also hide your character by doing this: