"SMB3" Colored Block Style Platform :o
I'm not sure if this is simple, or not, but here goes. Some games have solid platforms that you can jump through from underneath. Maple Story comes to mind. There are also various platforms in Mario, and Sonic games like this. I'm wondering if there is a script I can attach to a solid (or whatever, as long as it works) combo to create this effect.
If you are confused to what exactly I'm talking about, I need something that works like the big colored blocks in Super Mario Bros. 3.
http://www.youtube.com/watch?v=Fs299lPuYZo
Thank you.
Re: "SMB3" Colored Block Style Platform :o
A bit like the drop-through platforms at about 45 seconds in here?
Re: "SMB3" Colored Block Style Platform :o
Re: "SMB3" Colored Block Style Platform :o
I shall have a look at modifying that script for general use.
It's a bit caught up in my horrendous mess of kirby code at the moment.
Re: "SMB3" Colored Block Style Platform :o
Thank you. I've never attached a script to a combo before, so Imay need some general assistance :)
Re: "SMB3" Colored Block Style Platform :o
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.
Re: "SMB3" Colored Block Style Platform :o
Awesome. I'll have to test it later though. I'll be a bit busy over the next few days.