I'm looking to essentially auto proceed to the build submenu on a worker via a trigger command.
Like when you press B on a probe it proceeds to the basic building submenu. However the only orders you can issue to a probe are essentially, Build X, not what I need.
Is this possible?
Alternately, Is it simply possible to simulate a keyboard input on a unit through a script? Essentially issue keypress "B" once that probe is selected?
I could definitely be wrong, but I don't think you can issue keyboard-based shortcuts to units. If you are talking about bringing up a sub-UI, you'd probably need to use layout files and/or re-create interfaces via dialog items. You're not going to be able to get there with triggers interacting with existing UI elements.
Essentially, if your only aim is to have the build command page show when you click a probe, there is a solution.
Add all the 'Build X' buttons to the front page of the unit's command buttons, probably overlapping all the common command buttons such as attack, move, etc. Simple is that.
Voila, when you click on the probe, you get its build submenu right away. You can deactivate this via triggers through show/hide ing all the 'Build X' buttons if say the player prefers the usual build menu. The unit will still be able to perform basic actions like attack, move and harvest that are issued on right-mouse click.
And no you do not need layout files or any UI modifications to do this fyi :D
Essentially, if your only aim is to have the build command page show when you click a probe, there is a solution.
Add all the 'Build X' buttons to the front page of the unit's command buttons, probably overlapping all the common command buttons such as attack, move, etc. Simple is that.
Voila, when you click on the probe, you get its build submenu right away. You can deactivate this via triggers through show/hide ing all the 'Build X' buttons if say the player prefers the usual build menu. The unit will still be able to perform basic actions like attack, move and harvest that are issued on right-mouse click.
And no you do not need layout files or any UI modifications to do this fyi :D
Okay I will try this using a Catalog Set function on the command card stuff. Otherwise a completely triggered approach probably won't be appropriate and I will use a workaround.
Thanks
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi there,
I'm looking to essentially auto proceed to the build submenu on a worker via a trigger command.
Like when you press B on a probe it proceeds to the basic building submenu. However the only orders you can issue to a probe are essentially, Build X, not what I need.
Is this possible?
Alternately, Is it simply possible to simulate a keyboard input on a unit through a script? Essentially issue keypress "B" once that probe is selected?
@megabuster33: Go
I could definitely be wrong, but I don't think you can issue keyboard-based shortcuts to units. If you are talking about bringing up a sub-UI, you'd probably need to use layout files and/or re-create interfaces via dialog items. You're not going to be able to get there with triggers interacting with existing UI elements.
@megabuster33: Go
Essentially, if your only aim is to have the build command page show when you click a probe, there is a solution.
Add all the 'Build X' buttons to the front page of the unit's command buttons, probably overlapping all the common command buttons such as attack, move, etc. Simple is that.
Voila, when you click on the probe, you get its build submenu right away. You can deactivate this via triggers through show/hide ing all the 'Build X' buttons if say the player prefers the usual build menu. The unit will still be able to perform basic actions like attack, move and harvest that are issued on right-mouse click.
And no you do not need layout files or any UI modifications to do this fyi :D
this is the correct solution
Okay I will try this using a Catalog Set function on the command card stuff. Otherwise a completely triggered approach probably won't be appropriate and I will use a workaround.
Thanks