//Invisible maze. 1.1
//When Link approaches specific combos they change to specific combos (Rise) and return back when away(Lower). Lensof Truth reveals entire maze.
//Place invisible FFC anywhere in the screen.
//D0 - Combo ID for Lowered state
//D1 - Combo ID for risen state
//D2 - proximity distance
//D3 - item that reveals entire maze.
//D4 - >0 - Reveal maze vis Lens of Truth
ffc script InvisibleMaze{
void run(int lowered, int raised, int distance, int itm, int lens){
while(true){
if (Link->Item[itm]){
for(int i=0; i<176; i++){
if (Screen->ComboD[i]==lowered)Screen->ComboD[i]=raised;
}
Quit();
}
for(int i=0; i<176; i++){
if(Distance(ComboX(i),ComboY(i),Link->X,Link->Y)<distance || (lens>0 &&UsingItem(I_LENS))){
if (Screen->ComboD[i]==lowered)Screen->ComboD[i]=raised;
}
else if(Screen->ComboD[i]==raised){
Screen->ComboD[i]=lowered;
}
}
Waitframe();
}
}
} //InvisibleMaze