You could take event 5 and delete all its sub events and actions.
Then add this one action:
b: set value at a.curx to int(mid(“11100001”, 4*a.at(a.curx-1)+2*a.at(a.curx)+a.at(a.curx+1), 1))
No idea if it’s faster but it’s more compact.
It works very well, thanks!
Went from 12.5 % to 7.5 % CPU usage.
What's that formula: 4*array.at(array.curx-1)+2*array.at(array.curx)+array.at(array.curx+1)