Nodebundle for playing with nodes

 From:  Barry-H
7777.789 
Hi All,
I would like to be able to move an object automatically if it intersects another.
The logic is.
1) Select object 1 and 2
2)Check if they intersect.
3) If Yes move object 2 a given amount 'X+' and keep looping till No intersection or move limit reached.
4) If No move object 2 a given amount 'X-' and keep looping till Yes intersection or move limit reached.
5) When either steps 3 or 4 have been achieved set a flag to indicate loop end.
I know we have an intersect node but I need a true or false or 0 or 1 output.
Any ideas how to achieve this ?
Barry