Thread Tools Display Modes
08-04-21, 08:56 PM   #1
JahirahDK
An Aku'mai Servant
 
JahirahDK's Avatar
Join Date: Sep 2020
Posts: 38
Conditional inheritance

I've been wanting to ask how a macro such as this would work.... if at all....
My question centers around the [group/nogroup] and whether or not they apply to the subsequent conditionals?
Code:
/cast [group][@focus,exists,nodead][@mouseover,exists,nodead,harm][] Counter Shot
/cast [nogroup][exists][nodead][harm][] Counter Shot
Would this kind of macro work or do you need to add "group" to the individual conditional statements?
__________________
//Jahirah

Last edited by JahirahDK : 08-04-21 at 08:59 PM.
  Reply With Quote
08-04-21, 11:16 PM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
There is no inheritance to macro conditions. The comma-separated list inside the brackets is a logical and, meaning everything has to be true to apply. The groups enclosed in brackets are then considered as a logical or, meaning only one of the conditions need to be true for the spell to cast. The target parameter from the first matching logical and is used for the associated spell.

I'm guessing this is the macro you're trying to make:
Code:
/cast [@focus,group,harm,nodead][@mouseover,group,harm,nodead][] Counter Shot
Notes: For a spell that requires an enemy, it's better off to use harm instead of exists. Also, harm implies exists, you don't need both defined.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
08-04-21, 11:17 PM   #3
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
no,each bracket [] is tested and the first that is true is executed.
So you need group/nogroup in each bracket you want it to work.
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
08-05-21, 12:43 AM   #4
JahirahDK
An Aku'mai Servant
 
JahirahDK's Avatar
Join Date: Sep 2020
Posts: 38
Thank you both, appreciate your input!
__________________
//Jahirah
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Macro Help » Conditional inheritance

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off