I know I am not the most descriptive person and sorry about that.The problem I face is that I want to apply the same technique to some temperature skins and a cpu skin that checks cpu load percentage.
And here comes the tricky part. If the persentage is 61% (1% over the recomended usage) it will start "ringing".
THE NEXT SECOND the percentage can be 59% and the skin will reset the IfTrueAction.
THE NEXT SECOND AFTER THAT the percentage can be 62% and it will start "ringing" again!
So it will look like this: 59%(ok) > 61%(ringing) > 59%(ok-reset) > 65%(ringing) > 62%(ok) > 58%(ok-reset) > 63%(ringing) > 59%(ok-reset) > 63%%(ringing) > and so on...
If I described it well enough this time, the skin will ring after 2-3 or 4 seconds if by any luck the recomended percentage or temperature happens to go up and down very near that recomended value.
What I thought was to reset the check ONLY AFTER the recomended percentage or temperatuer drops BY A LOT. And by a lot I mean from 60 to 40 or 50. (ok 40% is a little exaggeration. more like 50%). So it will look like this.
59%(ok) > 61%(ringing) > 59%(ok) > 65%(ringing) > 62%(ok) > 58%(ok-NOT reset) > 63%(OK) > 59%(ok-NOT reset) > 35%(ok-NOW RESET) > 59%(ok) > 63%%(NOW ringing) > and so on...
Now that the problem is set: First of all, my first thought was to use some flag variables to deal with it like some other programing problems. Secondly, should I change the name of the post? Aaaaand that is it.
[hr][/hr]
Let's clarify something, because I'm a bit confused: you'd like to execute the action anytime when the usage is above 60% OR when it's below 40%? And want to not execute it when the usage is between these two values?
Have I understood well?
So I want to execute actions when needed. Execute action when the usage is above 60%, reset when below 40% and not when below 60% and only then start executing actions again when over 60%.