This is very simple. Stan, actually is correct. It is something that must be triggered. You know where it needs to be placed dependent on the need for it.
If I understand correctly, you want the action to happen as soon as the modification of the variable happens. This will require a check at that very point. Add a second action, after the modification action, to do whatever is required if the variable is satisfied. Be sure to delay this action by at least 2 tenths of a second to allow the computer modification to run.
Hope this helped!