Cooldown mechanism explained
In this video, I will show you how the cooldown system works and how to implement a basic cooldown mechanism in gen~.
Param CDtime(1000,min=10);
History cooldown(0);
cooldown = max(cooldown-1,0);
impulse = in1;
N = scale(noise(),-1,1,0,1);
allow = 0;
if(impulse && cooldown <= 0){
allow = 1;
if(N <= 0.9){
cooldown = mstosamps(CDtime);
}
}
out1 = allow;