Ok, to face the player towards the mouse is a bit tough, because you first have to create as many animations as as many angles you want the player to be able to face. Min. 8, but maybe even 12, 16 angles would be good.
Now there's a function called direction, which accepts 4 parameters, the coordinates of 2 points. Look it up in the game editor documentation (yes, I don't memorize code
).
Now that should return the angle of the imaginary line drawn between the 2 points, compared to an imaginary horizontal line pointing towards the right...
So you've got the angle calculated, you got the sprites: here's the coordination:
Again we'll use the Draw actor event, and use the script editor.
The code should look something like this:
int theanimnum;
theanimnum = //A formula;
ChangeAnimation(player, sprintf("angle%i", theanimnum), FORWARD);
This is if the animations are angle0, angle1, etc. The formula didn't come to my mind as I was writing this, but I think you'll be able to put it together, using the direction(), the number of angles you created sprites for, and the rotation angle between the sprites. It shouldn't be difficult...
On the other hand about making the player actually follow the mouse, the code I showed, and that you tried earlier isn't bad, but instead try and play around with adding, or subtracting from the mousex & mousey on the right side of the assignments, and eventually, after experimenting, you will get the right values to add/subtract....
Hope this was all understandable and clear.
PS: The reason for these complications is because GE can't really rotate sprites, no built in routines. Other users have coded some sprite rotational things, you may want to search the forums, for sprite rotation, and scaling. But I think these all use canvas actors, and maybe you don't want to deal with those...
Good luck!