Yeah, that did it, but it'd be more convenient to just have a $yaw... though any script wanting a $yaw could just do "yaw = (getyaw); ...".
Anyway, I'll whip something up for the GUI tomorrow (unless you want to race me to it).
EDIT: Here it is. Kind of hackish. I'm sure the yaw figuring could be done better. (The directions could also be done with variables added to make offsets, but I thought that'd be too complicated.)
Oh, and just to get it out of the way: you need to modify fpsgame/client.h as mentioned by MeatROme in the previous post (and recompile).
newgui "EB-dir" [
if (|| (< (getyaw) 45) (> (getyaw) 315)) [
guibutton [up] [ _EBbo = 0; _docm ]
guibutton [down] [ _EBbo = 3; _docm ]
guibutton [left] [ _EBbo = 4; _docm ]
guibutton [right] [ _EBbo = 1; _docm ]
guibutton [forward] [ _EBbo = 5; _docm ]
guibutton [backward] [ _EBbo = 2; _docm ]
]
if (&& (< (getyaw) 135) (> (getyaw) 45)) [
guibutton [up] [ _EBbo = 0; _docm ]
guibutton [down] [ _EBbo = 3; _docm ]
guibutton [left] [ _EBbo = 5; _docm ]
guibutton [right] [ _EBbo = 2; _docm ]
guibutton [forward] [ _EBbo = 1; _docm ]
guibutton [backward] [ _EBbo = 4; _docm ]
]
if (&& (< (getyaw) 225) (> (getyaw) 135)) [
guibutton [up] [ _EBbo = 0; _docm ]
guibutton [down] [ _EBbo = 3; _docm ]
guibutton [left] [ _EBbo = 1; _docm ]
guibutton [right] [ _EBbo = 4; _docm ]
guibutton [forward] [ _EBbo = 2; _docm ]
guibutton [backward] [ _EBbo = 5; _docm ]
]
if (&& (< (getyaw) 315) (> (getyaw) 225)) [
guibutton [up] [ _EBbo = 0; _docm ]
guibutton [down] [ _EBbo = 3; _docm ]
guibutton [left] [ _EBbo = 2; _docm ]
guibutton [right] [ _EBbo = 5; _docm ]
guibutton [forward] [ _EBbo = 4; _docm ]
guibutton [backward] [ _EBbo = 1; _docm ]
]
]
I'm relatively sure it works correctly, I tested the forward and left directions in eight positions with smoke and they all worked correctly. If something doesn't, let me know.
All the tab-spacing is there, but you'll have to go into the source and strip the HTML or redo it yourself.
I wasn't too good with the spatial stuff in my head, so I drew up this little aid consisting of a pair of two axes, labeled F-R-B-L and 5-1-2-4 respectively (N-E-S-W) to help me out. Very useful.
EDIT: Oops. Forgot to turn the greater-than and less-than signs into <s and >s. (Changed ampersands to &s just for the heck of it as well).)