Copy to Clipboard Test

Randomized Combo Cycling with SFX Code

//Randomized combo Cycling

//1. Place invisible FFC anywhere in the screen.
// D0 - Combo to cycle from.
// D1 - Minimum delay befor changing.
// D2 - Maximum delay befor changing.
// D3 - Combo to cycle into.
// D4 - CSet to cycle into.
// D5 - Sound to play, when 1st combo appears.
// D6 - Sound to play, when combo cycles into another.

ffc script RandomizedComboCycling{
	void run (int combo1, int mindelay, int maxdelay, int combo2, int cset2, int sound1, int sound2){
		int cycle[176];
		for (int i=0;i<176;i++){
			cycle[i]=-1;
		}
		while(true){
			for (int i=0;i<176;i++){
				if (Screen->ComboD[i]!=combo1){
					cycle[i]=-1;
					continue;
				}
				else if (cycle[i]<0){
					cycle[i] = mindelay + Rand(maxdelay-mindelay);
					Game->PlaySound(sound1);
					continue;
				}
				else if (cycle[i]>0){
					cycle[i]--;
					if (cycle[i]==0){
						Game->PlaySound(sound2);
						Screen->ComboD[i]=combo2;
						Screen->ComboC[i]=cset2;
						cycle[i]=-1;
					}
				}
			}
			//DebugCombos(cycle);
			Waitframe();
		}
	}
}