How to react to changes in output port values
Several nodes check if data has changed in a certain way and only let an event through if it has: Changed, Increased, Decreased, Became True, and Became False. In the composition below, the Became True node outputs an event each time the output of Is Within Rectangle changes from false to true, emitting a sound effect each time the mouse cursor enters the square.
Like Became False and the other nodes just described, the Allow Changes node only lets an event through if the data has changed. But Allow Changes is different because it passes the data through along with the event. This can be useful when your composition does something time-consuming or processor-intensive with the data, and only needs to do that work when the data changes. For example, this composition periodically picks a large image file to load, but avoids reloading the same image file if it’s picked twice in a row.