Achievement Trigger Tricks - Jamiras/RATools GitHub Wiki

A value changes to N X times

repeated(X, byte(address) == N) && unless(prev(byte(address) == N))

The HitCount on the repeated condition is incremented in the first frame where the condition is true. As long as the value doesn't change, the unless will keep the trigger paused in future frames, so the HitCount will not be updated further. At the point where the value changes again, the trigger will unpause and the process repeats.

This can also be achieved easier with AndNext:

repeated(X, byte(address) == N && prev(byte(address) != N))