You need one flag per button press, if I understand what your trying to do correctly! The last button press clears the flags so a total of 4 flags(sorry I was wrong when I stated 5) for a 5 press scenario! If each of your scenarios is 5 button presses long then you'd need 4 X 3 flags = 12
If you assign a flag for each light you'd have to make 2 macros for each light, One when it was turned on it set the flag and another macro that when it turned off the flag was cleared! Then you'd still have to make a macro that responded to the button presses and since you can turn a module on with its own address your sequence press wouldn't work as desired! In the end you'd be making more work for your self!
OK bear with me here. Wouldn't one flag per light work?
Lets make the lights a1,a2,a3 and use corresponding flags 1,2,3
The trigger will be some other single button press
______________________________________
Trigger press #1 ;if all lights are off, turn 1 on
Condition if Flag 1,2,3 off
send A1 on
set flag 1
Trigger press #2 ;if 1 is on, turn on 1 & 2
Condition if Flag 1 set
send A2 on
set flag 2
Trigger press #3 ;if 1 & 2 are on, turn on only 1 & 3
Else macro
condition if flag 1 set & flag 2 set
send A2 off
clear flag 2
send A3 on
set flag 3
Trigger press #3 ;if 1 & 3 are on, turn all on
Else macro
condition if flag 1 set & flag 3 set
send A2 on
set flag 2
Trigger press #4 ;if all are on turn all off
Else macro
condition if flag 1 set & flag 2 set & flag 3 set
send Alll off
clear flag 1,2,3
______________________________________
Isn't that just one macro? (it might be necessary to have three conditions at each step)
Please keep in miind that I have not actually used this stuff yet so I'm merely trying to demonstrate the logic to be used rather than be precise with regard to syntax, etc.
I do, however, have programming experience.
However even assuimg that my logic is correct I am still frustrated with the limited number of available flags. I would for instance like to control two such arrays of 4 or 5 lights in my kitchen alone.
KLF