function HyperTriggers(p1, p2) local Hyper = AllocSwitch() local p = PlayerGroup(p2) --comment( "Hyper Triggers" ) p:Conditions() Hyper:IsNotSet() p:Actions() Wait(0) Hyper:Set() Wait(0) Preserve() p = PlayerGroup(p1) p:Conditions() Hyper:IsSet() p:Actions() Wait(0) Hyper:Clear() Wait(0) Preserve() end function Track(player, unit, x_unit, x_player, y_unit, y_player) local p = PlayerGroup(player) p:Conditions() Always() p:Actions() CenterLocation( "X", player, unit, "Anywhere" ) CenterLocation( "Y", player, unit, "Anywhere" ) MoveUnit( x_player, x_unit, 1, "Anywhere", "X" ) MoveUnit( y_player, y_unit, 1, "Anywhere", "Y" ) Preserve() end function Compare(player) local found_x = AllocSwitch() local found_y = AllocSwitch() local p = PlayerGroup(player) local min = 0 local max = 224 local step = 8 for i=0,max/step do ---[[ p:Conditions() found_x:IsNotSet() p:Actions() CenterLocation( tostring(i*step), 9, "Zerg Zergling", "Anywhere") Preserve() p:Conditions() found_x:IsNotSet() BringExactly( 11, "Zerg Zergling", tostring(i*step), 1 ) p:Actions() found_x:Set() SetResource( player, i*step, "ore" ) Preserve() --]] ---[[ p:Conditions() found_y:IsNotSet() p:Actions() CenterLocation( tostring(i*step), 10, "Zerg Zergling", "Anywhere") Preserve() p:Conditions() found_y:IsNotSet() BringExactly( 12, "Zerg Zergling", tostring(i*step), 1 ) p:Actions() found_y:Set() SetResource( player, i*step, "gas" ) Preserve() --]] end p:Conditions() Always() p:Actions() found_x:Clear() found_y:Clear() Preserve() end HyperTriggers(1, 2) Track(1, "Terran Marine", "Zerg Zergling", 9, "Zerg Zergling", 10) Track(1, "Zerg Zergling", "Zerg Zergling", 11, "Zerg Zergling", 12) Compare(1)