March 3, 2021
Hot Topics:

Beginning MS Agent: Part 2

  • By Mack Male
  • Send Email »
  • More Articles »

You can load more than one Agent at a time, allowing you to create drama, or anything else you can creatively think of! The easiest way to load another character, is to copy the code from the first tutorial, and change a few things:

Assistant -> Assistant2 (or similar)C:\windows\msagent\chars\merlin.acs -> c:\windows\msagent\chars\anotheragent.acs

To see the second character, you will need to load it: Assistant2.Show. If you were to try creating a theater effect with the two agents now, you might be disappointed; the agents dont wait for one another! However, there is a way to script multiple agent speeches and actions. You must make use of Request and the Wait command. For example:

Assistant.Play "Greet"Set AssistantRequest = Assistant.Speak ("Hello!")Assistant2.Wait AssistantRequestAssistant2.Play "Announce"Set Assistant2Request = Assistant2.Speak ("Wazzup!")Assistant.Wait Assistant2RequestAssistant.Play "Pleased"Assistant.Speak "Now that is cool!"

To get the agents to look and sound the way you want will take some trial and error, but this should be a good starting point.

In The Next Tutorial

The next tutorial will focus on voice recognition and responding to user input. And I promise it won't take so long =)

Page 3 of 3

This article was originally published on November 19, 2002

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Thanks for your registration, follow us on our social networks to keep up-to-date