That depends on where you need the values to be changed.
In case you need it from the beginning you place it at the beginning of the entity's action.
If you need it at special occasions changed, then you have to write it into an if-condition within the while-loop of the entity's action.

You said, my suggestion didn't the trick: Did it anything at all?