I tried that, Novastar - just take Shawns origional post and doe everything in two's:break on
$agent_control = "agent.control.2"
$agent_name1 = "Merlin"
$agent_name2 = "Max"
$agent_path1 = "c:\winnt\msagent\chars\$agent_name1.acs"
$agent_path2 = "c:\winnt\msagent\chars\$agent_name2.acs"
$agent1 = olecreateobject ( "$agent_control" )
$agent2 = olecreateobject ( "$agent_control" )
$= oleputproperty ( $agent1, "connected", "s", "1" )
$= oleputproperty ( $agent2, "connected", "s", "1" )
$characters1 = val ( "&" + olegetproperty ( $agent1, "characters" ) )
$characters2 = val ( "&" + olegetproperty ( $agent2, "characters" ) )
$= olecallfunc ( $characters1, "load", "ss", "$agent_name1", "$agent_path1" )
$= olecallfunc ( $characters2, "load", "ss", "$agent_name2", "$agent_path2" )
$character1 = val ( "&" + olecallfunc ( $characters1, "character", "s", "$agent_name1" ) )
$character2 = val ( "&" + olecallfunc ( $characters2, "character", "s", "$agent_name2" ) )
$rs = olecallfunc ( $character1, "show" )
$= olecallfunc ( $character1, "play", "s", "greet" )
sleep 5
$rs = olecallfunc ( $character2, "show" )
$= olecallfunc ( $character2, "play", "s", "greet" )
sleep 2
$= olecallfunc ( $character1, "play", "s", "gestureleft" )
$= olecallfunc ( $character2, "play", "s", "gestureright" )
sleep 3
$= olecallfunc ( $character1, "speak", "s", "Hi there $agent_name2 !" )
sleep 3
$= olecallfunc ( $character2, "speak", "s", "Hi $agent_name1, whazzup!" )
sleep 3
$= olecallfunc ( $character1, "speak", "s", "All done ... have a nice day !" )
?"pause..." gets $c
$= olereleaseobject ( $agent1 )
$= olereleaseobject ( $agent2 )
exit
------------------
Or what about this script where they do what you want them to do (have a file with the commands ready, make it from the info on this site http://www.msagentring.org/agentchars.html ), just to see their full potential!
(just copy and paste the commands so that it's plaintext - no open lines, and name it [charactername].txt)
break on
RUN "c:\winnt\msagent\agentsvr.exe" ;this line is needed for mine to work!
$agent_control = "agent.control.2"
$agent_name = "Max"
$agent_path = "c:\winnt\msagent\chars\$agent_name.acs"
$agent = olecreateobject ( "$agent_control" )
$= oleputproperty ( $agent, "connected", "s","1" )
$characters = val ( "&" + olegetproperty ( $agent, "characters" ) )
$= olecallfunc ( $characters, "load", "ss","$agent_name","$agent_path" )
$character = val ( "&" + olecallfunc ( $characters, "character", "s","$agent_name" ) )
$rs = olecallfunc ( $character, "show" )
$= olecallfunc ( $character, "play", "s", "greet" )
sleep 1
$= olecallfunc ( $character, "speak", "s","Hello!" )
$= olecallfunc ( $character, "speak", "s","Just type in the box what you want me to do:" )
$= olecallfunc ( $character, "speak", "s","To make me dissapear or reappear, type go or return" )
$= olecallfunc ( $character, "speak", "s","To see what I can do, type command." )
$= olecallfunc ( $character, "speak", "s","To quit, just press enter without typing anything." )
DO
"Text:"
gets $text
SELECT
CASE ($text="go") $rs = olecallfunc ( $character, "hide" )
CASE ($text="return") $rs = olecallfunc ( $character, "show" )
CASE ($text="command") SHELL '%comspec% /c notepad.exe c:\kix\msagent\$agent_name.txt'
CASE 1 GOSUB command
ENDSELECT
UNTIL $text=""
$= olereleaseobject ( $agent )
EXIT
:command
$notalk=0
OPEN (7,"c:\kix\msagent\$agent_name.txt")
$command=READLINE(7)
WHILE $command<>""
IF $text=$command $= olecallfunc ( $character, "play", "s","$text") $notalk=1 ENDIF
$command=READLINE(7)
LOOP
CLOSE (7)
IF ($notalk=0) $= olecallfunc ( $character, "speak", "s","$text") ENDIF
RETURN
[This message has been edited by Fuentez (edited 05 August 2000).]