» Wed Sep 29, 2010 2:14 am
If I were to make this mod (which I might have a go at later on today, though at the moment I'm working on a completely different mod, so we'll see how that goes), I'd do it like this:
I would give the player an invisible, unplayable token object so that a script runs on him every frame. In its MenuMode 1002 block, I'd have a detection set up to see if 1-8 are pressed. If they are, I'd then set up variables to remember if Ctrl, Alt, and/or Shift are pressed. I'd then check for a left mouse button press. If I get that, then I'd check to see if the hotkey item at that position and combination has changed. If not, then I'd blank out that item/combination. If it has, then I'd set the new item as the new hotkey item connected to that combination.
What I'd prefer is an actual SetHotkeyItem function (for various reasons, especially remembering hotkey items when you go through casinos and stuff), but that's not int he current version of FVSE. If I had it, then I'd be able to dynamically swap out sets of hotkeys and allow the normal hotkey behavior take over when someone pushes a hotkey button and the 'extended' hotkey buttons. Without it, I'd have to fake it, meaning the little squares that show the different hotkey items wouldn't actually represent the items hotkeyed there. Very annoying.