i need my character to face a particular cursor at all time

Started by timlump, Sat 13/05/2006 22:11:31

Previous topic - Next topic

timlump

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

DoorKnobHandle

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:

Code: ags

// this goes in repeatedly_execute

if ( GetCursorMode ( ) == MODE_SHOTGUN )
// if the shotgun mode is the current cursor mode
{
   FaceLocation ( EGO, mouse.x, mouse.y );
}


SMF spam blocked by CleanTalk