dustingunn: I'm not really sure what that script does.
From the description, it returns the smallest angle between two, right ?
Couldn't you achieve the same thing with the min() expression ?
Anyway, about while, the workaround doesn't seem to apply there, since you need the while loop to be executed in that specific tick, not over several ticks.
(FakeWhile.capx)
Maybe the branch plugin could be of help there (check out the plugins for C2 forum).