Here is my code:
strAgentName = "Merlin"
strAgentPath = "C:\WINDOWS\msagent\chars\" & strAgentName & ".acs"
Set objAgent = CreateObject("Agent.Control.2")
objAgent.Connected = True
objAgent.Characters.Load strAgentName, strAgentPath
Set objCharacter = objAgent.Characters.Character(strAgentName)
objCharacter.Show
objCharacter.play "GetAttention"
objCharacter.speak "Hi I'm Merlin!"
objCharacter.play "LookDown"
objCharacter.Think "Hey..."
objCharacter.MoveTo 500, 400
objCharacter.play "Pleased"
objCharacter.speak "Hello"
objCharacter.play "Pleased"
objCharacter.play "LookDown"
objCharacter.speak "See this is all it does."
objCharacter.Hide
Do While objCharacter.Visible = True
Loop
The program will Show and Hide the Merlin character, but gives the following error on any of the other action requests (play, speak, etc.):
"The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call did not execute."
I find it strange that it will load the Merlin character, showing him and hiding him, but errors on any of the other actions. I have not made any references or added any components to my project. The code above is all I have. Any help on this would be much appreciated. Thank you in advance.
strAgentName = "Merlin"
strAgentPath = "C:\WINDOWS\msagent\chars\" & strAgentName & ".acs"
Set objAgent = CreateObject("Agent.Control.2")
objAgent.Connected = True
objAgent.Characters.Load strAgentName, strAgentPath
Set objCharacter = objAgent.Characters.Character(strAgentName)
objCharacter.Show
objCharacter.play "GetAttention"
objCharacter.speak "Hi I'm Merlin!"
objCharacter.play "LookDown"
objCharacter.Think "Hey..."
objCharacter.MoveTo 500, 400
objCharacter.play "Pleased"
objCharacter.speak "Hello"
objCharacter.play "Pleased"
objCharacter.play "LookDown"
objCharacter.speak "See this is all it does."
objCharacter.Hide
Do While objCharacter.Visible = True
Loop
The program will Show and Hide the Merlin character, but gives the following error on any of the other action requests (play, speak, etc.):
"The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call did not execute."
I find it strange that it will load the Merlin character, showing him and hiding him, but errors on any of the other actions. I have not made any references or added any components to my project. The code above is all I have. Any help on this would be much appreciated. Thank you in advance.