[2005] Microsoft Agent Character
Hi, I'm fairly new to VB programming (but not new to programming in general). I am trying to figure out how to make a microsoft agent character do something, and then make the program wait until the character has finished doing it, and then execute more code. I have looked it up and found some sites that say how to do it, but it doesn't seem to be working. Can someone tell me what's wrong with this code:
agent.Show()
Code:
Dim controlRequest As Object
controlRequest = agent.Speak("Hello, I'm just wasting some time")
agent.Play("Idle2_2")
While controlRequest.Status <> 0
Thread.Sleep(250)
End While
Label1.Text = "It works!"
controlRequest.Status never equals 0 (Request complete), like it is supposed to. It is constantly 2 (Request pending)
How do I fix this?
Thanks,
WobbleU
Re: [2005] Microsoft Agent Character
Its because of the animation your are playing. The idle animations are an endless loop of the character sleeping or whatever. Its not like its doing a "Hello" wave and be done.
Re: [2005] Microsoft Agent Character
No it's not. controlRequest is assigned to agent.Speak("Hello..."), not the animation. I also changed it to "Wave" from "Idle2_2" just to make sure, and it had no effect.
WobbleU