Trying to see if there's a way to bind a macro to shift + click.
This game executes an action when you click on a player and a different action when you shift+click on a player.
I want to try and bind the shift+click action to a key press but either it's not possible or I'm not doing it correctly.
The command ".click " will only run the normal click proc obviously.
But if I bind that command to a macro on say... pressing TAB and hold shift when I press the key, it still only runs the click version and not the shift+click action.
Is there any way to actually do this?
mob that's the code for running this proc. It works when you actually hold shift and click on someone, but if I try to bind a macro for it on a key, it ignores the shift and runs the proc like its just a click on its own. for example... ".click IceFire2050" bound to TAB Will just run my regular click proc, not the shift + click proc, even when holding shift down while running it. |
If you're using a keyboard macro to fake a click, it makes more sense to have a custom verb call Click() for you with the right args.
|
I know there are better ways to do this in code for macros. I posted this in byond help rather than developer help initially but it got moved.
The game's default controls are by mouse for this function. Some players have asked for ways to bind these to macros. Any of the click functions can be bound without issue but the key press+click functions dont seem to be usable without me coding in verbs for them. I was trying to confirm if there was a way for the macros to interact with additional key presses because I and nobody else could find a way to do it. |
All mouse commands should get info on modifier keys in the parameters. You have to parse the params via params2list() and then you can handle the shift key in Click().