Tutorials    Freebies    Links    Feedback    Thank me
Agent Store   Agent Games   Legal notice    History
Home

Intro»»Part 1»»Part 2»»Part 3»»Part 4»»Part 5

Using the "Default Character"

The "Default Character" is the one chosen by the user as their favourite. It would be used by any program which doesn't specifically set a character to use, as in the previous example.

To use the "Default Character", replace the previous code with this:

General | Declarations
Dim TheAgent As IAgentCtlCharacter
Private Sub Form_Load()
Agent1.Characters.Load "default"
Set TheAgent = Agent1.Characters("default")
TheAgent.Show
TheAgent.Speak "Hello"
TheAgent.Play "GestureLeft"
TheAgent.Hide
End Sub

To let the user change the "Default Character", add this code:
Agent1.ShowDefaultCharacterProperties
to your program.

Intro»»Part 1»»Part 2»»Part 3»»Part 4»»Part 5