(Made into new topic instead of putting in OP's thread)
I think adding three or four "blank" buttons for each unit would work. They run a fuction in the script when activated, and a bitmap or image file for their button could be defined in the fbi so that the player would know what the buttons would do. An fbi option to make them togglable might be a good idea too
Just an idea
"Blank" buttons idea for both gui and scripting
Moderator: Moderators
- Guessmyname
- Posts: 3301
- Joined: 28 Apr 2005, 21:07
I think this should work without a fixed number and could possibly be combined with any existing command (e.g. "fire weaponX" or "move").
More specifically, a button would have three modes:
-trigger: Simply calls the associated script function (ActivateButtonX?).
-toggle: Cycles through a list of n states and calls a function on each change (ActivateButtonX(statenum)?).
-command: Has an associated order (can be any existing order or "use weaponX"), when clicked on the cursor turns into the corresponding command and when that is given on a valid target the first function (ActivateButtonX?) is called along with any other functions the order would trigger. Once the order ends (stop command or done) a second function is called (DeactivateButtonX?)
The On/Off button could be turned into the second, the DGun button into the third type. This could be wrapped like the old AimPrimary, etc functions so candgun=1 and onoffable are interpreted as buttons emulating these features.
More specifically, a button would have three modes:
-trigger: Simply calls the associated script function (ActivateButtonX?).
-toggle: Cycles through a list of n states and calls a function on each change (ActivateButtonX(statenum)?).
-command: Has an associated order (can be any existing order or "use weaponX"), when clicked on the cursor turns into the corresponding command and when that is given on a valid target the first function (ActivateButtonX?) is called along with any other functions the order would trigger. Once the order ends (stop command or done) a second function is called (DeactivateButtonX?)
The On/Off button could be turned into the second, the DGun button into the third type. This could be wrapped like the old AimPrimary, etc functions so candgun=1 and onoffable are interpreted as buttons emulating these features.