Is there anyway to make the ego's head follow the cursor while he's idle? I suppose I could use regions, but that could get very complicated. Are there any easier ways to do this? Are there any at all?
Something like:
if (character[EGO].view == IDLE-1) {
Ã, FaceLocation (EGO, mouse.x, mouse.y);
}
in the repeatedly execute might do it, but I'm not sure if turning EGO would take him out of idle. If it does:
if ((character[EGO].walking == 0) && (character[EGO].animating == 0)) {
Ã, FaceLocation (EGO, mouse.x, mouse.y);
}
might be better. Not had time to test these, but hope they help.
Yep, Ashen's suggestion looks good. I'd modify it slightly to cope with scrolling rooms:
if ((character[EGO].walking == 0) && (character[EGO].animating == 0)) {
FaceLocation (EGO, mouse.x + GetViewportX(), mouse.y + GetViewportY());
}
On the note of problems with it, maybe TikiTikiman wanted something to make him look up, diag, straight, down, at the camera, etc. I think it could be done in the global script, by cutting the virtual screen into a grid of, lets say, nine squares. When its directly over his head, he'll look up, etc. Couldn't code it without the editor here, though. :)
What if you create a view that includes diagonals, where only the face/head moves, then use:
if ((character[EGO].walking == 0) && (character[EGO].animating == 0)) {
SetCharacterView (EGO, FACEVIEW);
FaceLocation (EGO, mouse.x + GetViewportX(), mouse.y + GetViewportY());
}
else ReleaseCharacterView(EGO);
would that work? Or at least something like it.
Thanks for the help. Personally, I like Hollister Man's idea, but I might as well try the others before I get to crazy with the square grids. Thanks again.