You should have an image for each direction that the guy looks at. Say, you are using 9 images, up-left up up-right left middle right down-left down-middle and down-right.
You can line them up into a big image and load them with LoadAnimImage. Suppose you have the Graphics mode set to 800x600, you can use this:
"fr" is the index number of the frame that should be drawn. The 800x600 screen is divided in 9 parts, 3 over the x-axis and 3 over the y-axis: 800/3=266 and 600/3=200.
You can line them up into a big image and load them with LoadAnimImage. Suppose you have the Graphics mode set to 800x600, you can use this:
fr = (MouseX() / 266) + (MouseY() / 200) * 3 DrawImage image, 400, 300, fr
"fr" is the index number of the frame that should be drawn. The 800x600 screen is divided in 9 parts, 3 over the x-axis and 3 over the y-axis: 800/3=266 and 600/3=200.