RizlaUK
03-09-2008, 08:50 PM
anyone had any luck useing MSAgent with LuaCOM ???
iv been asked to work on a educational project for my daughters school that will use some MSAgent characters, i can make this work in PB but i want to use AMS and i dont want to have to wrap every command i sent to MSAgent in a dll as there could be 1000's
heres what i have
AgentObj = luacom.CreateObject("Agent.Control.2")
if AgentObj then
if AgentObj then
AgentObj.Connected=true
AgentObj.Characters.Load("Max", "Max.acf")
AgentObj.Characters.Show("Max")
AgentObj.Characters.Play("Max","Greet")
AgentObj.Characters.Speak("Max","Hello. ")
end
else
Dialog.Message("Error", "Could not create luacom object.")
end
it gets past the "AgentObj.Connected" but then errors on "AgentObj.Characters.Load" saying "Characters is a nil value" but it should be there,
heres what MS has to say.....but it dident really help me :(
http://msdn2.microsoft.com/en-us/library/ms695962.aspx
what am i doing wrong ?
iv been asked to work on a educational project for my daughters school that will use some MSAgent characters, i can make this work in PB but i want to use AMS and i dont want to have to wrap every command i sent to MSAgent in a dll as there could be 1000's
heres what i have
AgentObj = luacom.CreateObject("Agent.Control.2")
if AgentObj then
if AgentObj then
AgentObj.Connected=true
AgentObj.Characters.Load("Max", "Max.acf")
AgentObj.Characters.Show("Max")
AgentObj.Characters.Play("Max","Greet")
AgentObj.Characters.Speak("Max","Hello. ")
end
else
Dialog.Message("Error", "Could not create luacom object.")
end
it gets past the "AgentObj.Connected" but then errors on "AgentObj.Characters.Load" saying "Characters is a nil value" but it should be there,
heres what MS has to say.....but it dident really help me :(
http://msdn2.microsoft.com/en-us/library/ms695962.aspx
what am i doing wrong ?