Platform SDK: Agent

IAgentNotifySink::Move

HRESULT Move(
   long dwCharID,  // character ID
   long x,         // x-coordinate of new location
   long y,         // y-coordinate of new location
   long dwCause    // cause of move state
);                          

Notifies a client application when the character has been moved.

dwCharID
Identifier of the character that has been moved.
x
The x-coordinate of the new position in pixels, relative to the screen origin (upper left). The location of a character is based on the upper left corner of its animation frame.
y
The y-coordinate of the new position in pixels, relative to the screen origin (upper left). The location of a character is based on the upper left corner of its animation frame.
dwCause
The cause of the character move. The parameter may be one of the following:
Value Description
const unsigned short NeverMoved = 0; Character has not been moved.
const unsigned short UserMoved = 1; User dragged the character.
const unsigned short ProgramMoved = 2; Your application moved the character.
const unsigned short OtherProgramMoved = 3; Another application moved the character.
const unsigned short SystemMoved = 4 The server moved the character to keep it onscreen after a screen resolution change.

This event is sent to all clients of the character.

See Also

IAgentCharacter::GetMoveCause, IAgentCharacter::MoveTo