Title: How to retrieve the list of animations of a given MS Agent
uses..., ActiveX;
private
Req: IAgentCtlRequest;
Character: IAgentCtlCharacterEx;
AnimationNames: IAgentCtlAnimationNames;
procedure AgentAnimationEnum;
procedure TForm1.FormCreate(Sender: TObject);
begin
Agent1.Characters.Load('Char', 'merlin.acs');
Character := Agent1.Characters.Character('Char') as IAgentCtlCharacterEx;
AgentAnimationEnum;
end;
procedure TForm1.AgentAnimationEnum;
var
AEnum: IEnumVariant;
Fetch: Cardinal;
V: OleVariant;
begin
AnimationNames := Character.AnimationNames;
AEnum := AnimationNames.Enum as IEnumVariant;
AEnum.Reset;
ListBox1.Items.Clear;
repeat
AEnum.Next(1,V, Fetch);
if VarToStr(V) EmptyStr then
ListBox1.Items.Add(V);
until Fetch = 0;
end;