Well.... there is a
distance command....
the only way I ever use it is in a trigger like so:
condition: playerone distance comp1 < 2
activation: whatever
so.. I'm assuming that you could make your activation line be where you make your variable true
once the condition is met
BTW the 2 is = 2 metres
EDIT*** I guess I have to type a little faster... LOL ;D *****