PDA

View Full Version : MSAgent in AMS


Worm
08-17-2005, 12:02 PM
Okay, I was bored at lunch today and have wanted to play with the MSAgent Control in AMS for sometime now.

So here it is, in all it's glory. You'll need the luaCom (http://www.icynorth.com) plugin too.

Intrigued
08-17-2005, 12:14 PM
Neat!

I clicked on the "Merlin Rocks!" label and it gave the following error though.

:-(

I should add that Merlin did show up for the first click.

Worm
08-17-2005, 12:30 PM
Well, I only have so much time at lunch :)

Add,

MyAgent = nil

before the else in the label, and you should be good.

Did you try dragging him around any?


Neat!

I clicked on the "Merlin Rocks!" label and it gave the following error though.

:-(

I should add that Merlin did show up for the first click.

Worm
08-17-2005, 12:51 PM
Bug fix :)

Intrigued
08-17-2005, 01:36 PM
Sha'zaaam!

It's got some Bling Bling there.

:yes

*Hey, share that soda pop there!*

Ted Sullivan
08-17-2005, 01:56 PM
Very cool stuff!

Worm
08-17-2005, 02:08 PM
Here'a another way to sync your character with the app

change out the Speak line with this one:

MyAgent.Characters("Merlin"):Speak ("\\mrk=100\\Couldn't \\mrk=101\\you \\mrk=102\\have \\mrk=103\\come \\mrk=104\\up \\mrk=105\\with \\mrk=106\\something \\mrk=107\\a \\mrk=108\\little \\mrk=109\\more \\mrk=110\\creative \\mrk=111\\than \\mrk=112\\" ..Label.GetText("Label1").."?")

each \\mark=101\\ is a bookmark that can be used to trigger other things in the app.

Put this code in for the Global Function: MyAgentEvents:BookMark

function MyAgentEvents:Bookmark(BookmarkID)
if BookmarkID == 100 then
Label.SetText("Label1", "Couldn't")
elseif BookmarkID == 101 then
Label.SetText("Label1", "you")
elseif BookmarkID == 102 then
Label.SetText("Label1", "have")
elseif BookmarkID == 103 then
Label.SetText("Label1", "come")
elseif BookmarkID == 104 then
Label.SetText("Label1", "up")
elseif BookmarkID == 105 then
Label.SetText("Label1", "with")
elseif BookmarkID == 106 then
Label.SetText("Label1", "something")
elseif BookmarkID == 107 then
Label.SetText("Label1", "a")
elseif BookmarkID == 108 then
Label.SetText("Label1", "little")
elseif BookmarkID == 109 then
Label.SetText("Label1", "more")
elseif BookmarkID == 110 then
Label.SetText("Label1", "creative")
elseif BookmarkID == 111 then
Label.SetText("Label1", "than")
elseif BookmarkID == 112 then
Label.SetText("Label1", "Click Here")
end
end

yosik
08-17-2005, 03:04 PM
A beauty, Worm.
Now we just need lipsync and character animation and AMS will just be THE perfect app.....

Yossi

Corey
08-17-2005, 04:02 PM
Groovie. :yes

jfxwave
04-07-2006, 06:14 PM
I had some time at lunch to play around..

You need Merlin and Genie.

Thanks Worm i'm using your mouse.dll to make my agents fly to mouse on click on another project.


On Button, Picture or anywhere a mouse can click.
sMousePos ();
MyAgent.Characters("Merlin"):MoveTo(nX, nY)


In Global
function sMousePos()

nX=String.ToNumber(DLL.CallFunction("AutoPlay\\Docs\\mouse.dll", "GetMouseX"
, Application.GetWndHandle()
, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL));
nY=String.ToNumber(DLL.CallFunction("AutoPlay\\Docs\\mouse.dll", "GetMouseY"
, Application.GetWndHandle()
, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL));

end

I'm just starting out with AutoPlay but i'm loving it.

playmenow
04-08-2006, 12:55 AM
It's very very very cool! I didn't know it can be done in AMS. It's sooooooooooooooooooooooo cool. I'll use it! Thank you everyone!

jfxwave
04-08-2006, 07:08 AM
I'm trying to find out how to remove the text bubble. I think on some apps it would look really cool if they just talk without the bubble.


I like useing them in a app for help by using

if MsAgent == nil then
--do normal stuff
else
--make agent popup and talk about whatever the user clicked on.
end

The user has to click on HELP to make MsAgent ~= nil