Rather than set up a round robin that alternates between two groups with every note event, I'm trying to write a script that only triggers the 2nd group when the same zone is played twice in a row. Unfortunately, the results I'm getting are that of a standard round robin. Can anyone tell me where I'm going wrong?
on init
declare $last_zone
declare $last_group
end on
on note
disallow_group($ALL_GROUPS)
if (($last_zone = get_event_par($EVENT_ID,$EVENT_PAR_ZONE_ID)) and ($last_group = 0))
allow_group(1)
$last_group := 1
else
allow_group(0)
$last_group := 0
end if
$last_zone := get_event_par($EVENT_ID,$EVENT_PAR_ZONE_ID)
end on