Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: timlump on Sat 13/05/2006 22:11:31

Title: i need my character to face a particular cursor at all time
Post by: timlump on Sat 13/05/2006 22:11:31
in my game I need the main character EGO to face a particular cursor when its in use called SHOTGUN, it is the aimer of the characters gun
Title: Re: i need my character to face a particular cursor at all time
Post by: DoorKnobHandle on Sat 13/05/2006 22:16:19
Well, just use the normal character face-functions (depending on the version of AGS you use) and feed them the mouse location coordinates.

Example with AGS 2.62 or older:


// this goes in repeatedly_execute

if ( GetCursorMode ( ) == MODE_SHOTGUN )
// if the shotgun mode is the current cursor mode
{
   FaceLocation ( EGO, mouse.x, mouse.y );
}
Title: Re: i need my character to face a particular cursor at all time
Post by: timlump on Sun 14/05/2006 11:48:57
thanks