Hi justifun,
The "wait" thing is a pain, if you're not careful
Your code now works like this:
Tick 1:
choose randomly (e.g. group 1)
activate g1
start waiting - but only for the code in group 1
Tick 2: (group 1 already active)
choose randomly (e.g. group 2)
start waiting - but only for group 2 code
Tick 3: (groups 1 and 2 already active0
choose randomly .... etc
Can you see the pattern? wait does not stop the initial [section 1] code to be re-executed every tick!
What you can do is e.g. add a global var "isAnyGroupActive = 0"
Set it to 1 before "wait"
set it to 0 after "wait"
In section 1 add:
execute only if "isAnyGroupActive = 0"