Macro Help


Judas_Ace

 

Posted

So I try to make this macro:

/Macro Run "pow_exec_name Sprint$$pow_exec_name Ninja Run"

But it's not working how I want it to. If both are on, it turns both off...but if both or one is off, it alternates between them.

Any way to get a macro to have it turn both on and both off?


 

Posted

/macro ON "powexectoggleon Sprint$$powexectoggleon Ninja Run"
You'd just have to press it twice to activate both.

Then you'd need another one to turn them off:
/macro OFF "powexectoggleoff Sprint$$powexectoggleoff Ninja Run"


Alternately, you can do it with a single key by using binds instead:

/bind KEY "+$$powexectoggleon Sprint$$powexectoggleon Ninja Run"
/bind Shift+KEY "powexectoggleoff Sprint$$powexectoggleoff Ninja Run"

On keypress, Ninja run will turn on.
On key-release, Sprint will activate as well.
Using shift with the same key will turn them both off.

(The toggle OFF string only needs to be run once to disable all powers in the string.)


 

Posted

General Rule:
only 1 toggle (or click) can be turned ON with any single key/macro press
unlimited number of toggles can be turned OFF with a single key/macro press

powexec_name flips the current state of the toggle (if off it turns on, if on it turns off)
powexec_toggleON will only turn toggles on
powexec_toggleOFF will only turn toggles off

So masterblade's answers above will allow you turn on both sprint and ninja run (but you'll have to press the key/macro twice) and will allow you to turn both off with a single press.

---

What I do is to use a modified version of the speed on demand binds:

(I'm pulling these from memory - I've long since saved it off into an auto-load script)

/bind w forward$$+powexec_name ninja run
/bind s backward$$+powexec_name ninja run

So when I start moving ninja run turns on and when I let up on the key to stop, it turns off.

Then I just manually turn sprint on/off as desired if I'm travelling any appreciable distance.

Only problem is that when doing a lot of very short movements (like in combat) the toggle sometimes gets out of synch and operates backwards (on when not moving/off when moving), so I've also got a quick bind to toggle both ninja run and sprint OFF only.

I also have my L key bound to the auto-load scripts to permanently set the two binds and to reset them back to plain movement that I usually hit as I'm entering a mission (so it's normal movement inside a mish and ninja running outside of mish)


6000+ levels gained and 8 level 50's
Hello, my name is Soulwind and I have Alt-Itis.

 

Posted

Quote:
Originally Posted by Soulwind View Post
General Rule:
only 1 toggle (or click) can be turned ON with any single key/macro press

....
So masterblade's answers above will allow you turn on both sprint and ninja run (but you'll have to press the key/macro twice)
As I mentioned above, my bind will activate both with a single keypress. That's what the "+$$" at the beginning of that line will do. It will run any command twice, once on keypress, and once when you release the key. For powers, it will only work reliably for 2 toggles. You wouldn't be able to trick it into activating Aim and BuildUp at the same time for example.

That's how "+forward" works. When you press the key, it sets Forward to 1, and you move forward. When you release the key, Forward is set back to 0, and you stop moving.

Quote:
Originally Posted by Soulwind View Post
/bind w +forward$$powexec_name ninja run
/bind s +backward$$powexec_name ninja run
Fixed. "+powexecname" will probably error and forward/backward needs the + to actually work.


 

Posted

Thanks!