The if function takes as its 1st parameter a boolean value. It can be a number or any function returning a number. 0 is considered to mean false and any other value is considered to be true.For the global memory function (gmem), if multiple grids are trying to set a new value based on the current value at the same time, then yes, you'll get a race condition.
When I open this Reset-Grid Gmem78 automaticaly gets the value of source 2 .....if source two is on 50%>>now Gmem(78) is on 50
so you can set many variables with opening a grid.
Give it an ID...and with calling the ID you have your reset.
You can use timer to close the grid then automaticaly after e.g. 0.5s
For example, gmem(0, 100) returns 100. This allows chaining function calls.