Well, you don't so much 'attach a script to a combotype' (although that would be nice) as 'apply an ffc script to the screen that affects a certain combotype'.
Although, this one's 'add a chunk to your global script that affects a certain flag'.
But that's irrelevant really.
Code:
const int CF_PLATFORM = 98;
//Solidity Check, by Saffith
bool isSolid(int x,int y){
if(x<0 || x>255 || y<0 || y>175) return false;
int mask = 1111b;
if(x%16<8) mask &= 0011b;
else mask &= 1100b;
if(y%16<8) mask &= 0101b;
else mask &= 1010b;
int ret = Screen->ComboS[ComboAt(x,y)]&mask;
return ret != 0;
}
global script Slot_2{
void run(){
while(true){
if(!onFloor() && onFlag()) DropThroughPlatform();
Waitframe();
}
}
//Drop-Through Platforms
void DropThroughPlatform(){
if(!Link->InputDown && Link->Jump < 0) Link->Jump = 0;
}
bool onFloor(){
if(isSolid(Link->X+4,Link->Y+18) || isSolid(Link->X+12,Link->Y+18)) return true;
}
bool onFlag(){
if((Screen->ComboF[ComboAt(Link->X+4,Link->Y+16)] == CF_PLATFORM || Screen->ComboI[ComboAt(Link->X+4,Link->Y+16)] == CF_PLATFORM)
&& Screen->ComboF[ComboAt(Link->X+4,Link->Y+14)] != CF_PLATFORM && Screen->ComboI[ComboAt(Link->X+4,Link->Y+14)] != CF_PLATFORM) return true;
else if((Screen->ComboF[ComboAt(Link->X+12,Link->Y+16)] == CF_PLATFORM || Screen->ComboI[ComboAt(Link->X+12,Link->Y+16)] == CF_PLATFORM)
&& Screen->ComboF[ComboAt(Link->X+12,Link->Y+14)] != CF_PLATFORM && Screen->ComboI[ComboAt(Link->X+12,Link->Y+14)] != CF_PLATFORM) return true;
}
}
So basically all you have to do is combine this global script with any you already have, then put flag '98' wherever you want a drop-through platform.
If you want to change the flag it uses, just edit the constant at the top of the script.
I haven't actually tested it though. Hopefully it works.