Exececute on variable change.

I have a Boolean which is set every frame based on whether my player is under a roof. Then I push or pop a sound mix based on the result, but this is not only inefficient, for some reason it’s causing the soundmix to not transition properly. I’m wondering what’s the easiest/best way to only execute the sound mix change when the variable has changed. More (I’m guessing) like how the on overlap & end overlap feature works. I’ll upload a picture of my nodes later. Thanks!

That’s simple, just make a 2nd Boolean called ‘oldVARNAMEHERE’ and set it to the 1st Boolean right after setting the 1st one. And then in-between the two ‘set variable’ nodes, have a branch that checks whether or not the 1st and 2nd Booleans are the same, if they are not, then it has changed that frame.