Jump to content

How to make a macro that does 2 things


The Mighty Paladin

Recommended Posts

Macros are set up so that you cannot do more than 1 thing at a time, so you'll have to hit it twice. In order for this to work you'll have to have two identical costumes, the first one without wings and the second one with wings. Please note that costume slots in CoH are numbered 0-5, not 1-6.

 

/macro FLY "powexectoggleon fly$$cce 1"

 

This will first change to the second costume slot, which should be the one with the wings. The second click will turn on Fly.

 

/macro FLY "cce 0$$powexectoggleoff fly"

 

This will first turn fly off and then switch back to the first costume slot.

Being constantly offended doesn't mean you're right, it means you're too narcissistic to tolerate opinions different than your own.

Link to comment
Share on other sites

1 hour ago, PeregrineFalcon said:

Macros are set up so that you cannot do more than 1 thing at a time, so you'll have to hit it twice. In order for this to work you'll have to have two identical costumes, the first one without wings and the second one with wings. Please note that costume slots in CoH are numbered 0-5, not 1-6.

 

/macro FLY "powexectoggleon fly$$cce 1"

 

This will first change to the second costume slot, which should be the one with the wings. The second click will turn on Fly.

 

/macro FLY "cce 0$$powexectoggleoff fly"

 

This will first turn fly off and then switch back to the first costume slot.

this turns fly on and off but doesn't change the costume.

I get a message that says: 

Usage:cce takes 2 args, you gave 1. 

uses an emote to change costumes.

cce <int> <string>

Edited by The Mighty Paladin
Link to comment
Share on other sites

  • City Council
4 hours ago, The Mighty Paladin said:

this turns fly on and off but doesn't change the costume.

I get a message that says: 

Usage:cce takes 2 args, you gave 1. 

uses an emote to change costumes.

cce <int> <string>

That's because cce wants the costume index, and the emote to use, this wiki page covers it: https://homecoming.wiki/wiki/Cce_(Slash_Command)

Link to comment
Share on other sites

Ah, my mistake. Removing the 'e' should fix it. Like this:

 

/macro FLY1 "powexectoggleon fly$$cc 1"

/macro FLY2 "cc 0$$powexectoggleoff fly"

 

EDIT: I just tested both of these macros in game and verified that they do work.

Edited by PeregrineFalcon
tested!

Being constantly offended doesn't mean you're right, it means you're too narcissistic to tolerate opinions different than your own.

Link to comment
Share on other sites

  • 11 months later
On 10/16/2023 at 10:00 PM, PeregrineFalcon said:

Macros are set up so that you cannot do more than 1 thing at a time, so you'll have to hit it twice. In order for this to work you'll have to have two identical costumes, the first one without wings and the second one with wings. Please note that costume slots in CoH are numbered 0-5, not 1-6.

 

 

 

Does this mean that I can't create a macro to activate e.g. Fly and Sprint at the same time?

Link to comment
Share on other sites

3 hours ago, FlailBot said:

 

Does this mean that I can't create a macro to activate e.g. Fly and Sprint at the same time?

Correct.

 

You could make one macro that would turn on one of them at a time, though. Like this: /macro FlySprint "powexectoggleon Sprint$$powexectoggleon Fly"

 

Working from the right, it will first turn on fly, and then the next time you click it, it will skip over fly because it is already on and toggle it ON again will fail. So it moves to the next one to the left and turns on Sprint. 

 

Now, the macro: /macro FlySprintOff "powexectoggleoff Sprint$$powexectoggleoff Fly" will turn both off in one click, because you can deactivate as many things at once as you like, but only activate one at a time.

 

Link to comment
Share on other sites

Generally speaking, the above posts are accurate, but...

 

Read this https://homecoming.wiki/wiki/Macro_(Slash_Command) and this 

 

 

It's a more complicated setup, and there are limitations, but you can definitely use one macro to change a costume and activate fly and then click it again to change the costume back and turn off fly. Also multiple powers may be turned OFF with a single command string.

 

In City of Heroes, unlike other games, a "macro" is a BUTTON that activates a command string using a mouse to click on it.  Whereas a keybind is a keyboard KEY that activates a command string when that key is pressed. Keybinds are slightly more versatile in that they can utilize the "+" prefix in the beginning of a bind string to activate a command on key PRESS and a different command on key RELEASE, basically simulating turning on 2 powers with a single key stroke. It's a little finicky as sometimes one command string is not activated because the key was pressed and released too quickly. Some players use /powexec_auto to turn 2 powers on with a single command string, even click powers.

 

Suggested further reading if interested:

https://homecoming.wiki/wiki/The_Incomplete_and_Unofficial_Guide_to_/bind

http://www.barbariankeep.com/bs/bindguide.html

 

Link to comment
Share on other sites

On 10/5/2024 at 4:07 PM, Andreah said:

Correct.

 

You could make one macro that would turn on one of them at a time, though. Like this: /macro FlySprint "powexectoggleon Sprint$$powexectoggleon Fly"

 

Working from the right, it will first turn on fly, and then the next time you click it, it will skip over fly because it is already on and toggle it ON again will fail. So it moves to the next one to the left and turns on Sprint. 

 

Now, the macro: /macro FlySprintOff "powexectoggleoff Sprint$$powexectoggleoff Fly" will turn both off in one click, because you can deactivate as many things at once as you like, but only activate one at a time.

 

 

HMm... okay that does actually save me a button click or (if not a slot). Shift+4 can always be turn em 'on and Shift+5 can always been turn 'em off!
 

Neato!

 

The other use case I had was, if I'm jamming my fast recharge melee attack (like Barb Swipe) and it's on CD, I *may as well* Brawl someone. But that sounds like a usecase that is explicitly designed to be avoided.

Link to comment
Share on other sites

28 minutes ago, FlailBot said:

The other use case I had was, if I'm jamming my fast recharge melee attack (like Barb Swipe) and it's on CD, I *may as well* Brawl someone. But that sounds like a usecase that is explicitly designed to be avoided.

That's right. Many attack powers can't be set up that way. You would think you can set up a macro to do melee power 1, or melee power 2, based on which one is ready to go, but the one on the right will just get queued to go again, and the one on the left in the macro won't get activated.

 

The developer's intention is that you are able to do one action per keystroke, and that you can't trivially automate combat. For example, imagine if you could set your entire attack rotation up onto one key, that you just press over and over? I suppose some folks might really want that, but automated play or even semi-automated play wasn't a design goal of the original devs, and that's still true today. Even the ability to autofire a power is limited strictly to one power at a time. (There's are some clever ways to make it seem like there's more, but they all involve a key being pressed.)

Edited by Andreah
fixed my lysdexia typos.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...