I think that should work, but if it doesn't Here's the first portion of my encounter finding script (the second half is refining the encounter) I know using a break statement like this works. set x to 1. declare parameter delta. add node(time + x, 0, 0, 870). //Added so there will be a node to remove in first loop. until encounter = "Mun" { remove nextnode. add node(time + x, 0, 0, delta). if encounter = "Mun" {break.}. set x to x + 5. }.