I'm trying to disable queuing actions like move, attack, and patrol. I made a trigger to look for these 3 actions and then put
if shift key pressed == true and then I redo the action to the new point replacing existing orders.
But I get this run time error "EventKeyHasMetaFlags has no matching event".
Googling shows that the error means I have to use key pressed to check for shift. But the key pressed event doesn't continually fire while a key is down, only on the instant of the press.
Is there any way to get the current state of a key? Or anyone know of another way to do this?
Edit: Nevermind. I didn't think this through enough. I don't need to check for shift. I can just always redo the action targetting the new position.
I think you can change a units available queued orders in the data editor, although I have no idea how. Changing that value to 1 means that you could disable the shift stuff.
So intercepting every move action and reissuing the order, replacing the existing order bugs things out. I hope there is a queue depth setting in the editor somewhere.
You could always go back to checking if shift is pressed. You just need to enable a switch when shift is pressed down, then when it's pressed up turn the switch off again. Then check for the switch when the unit is issued an order.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'm trying to disable queuing actions like move, attack, and patrol. I made a trigger to look for these 3 actions and then put if shift key pressed == true and then I redo the action to the new point replacing existing orders. But I get this run time error "EventKeyHasMetaFlags has no matching event".
Googling shows that the error means I have to use key pressed to check for shift. But the key pressed event doesn't continually fire while a key is down, only on the instant of the press.
Is there any way to get the current state of a key? Or anyone know of another way to do this?
Edit: Nevermind. I didn't think this through enough. I don't need to check for shift. I can just always redo the action targetting the new position.
I think you can change a units available queued orders in the data editor, although I have no idea how. Changing that value to 1 means that you could disable the shift stuff.
@homer_3: Go
So intercepting every move action and reissuing the order, replacing the existing order bugs things out. I hope there is a queue depth setting in the editor somewhere.
In what way does it not work? I would have suggested you try this.
You could always go back to checking if shift is pressed. You just need to enable a switch when shift is pressed down, then when it's pressed up turn the switch off again. Then check for the switch when the unit is issued an order.