User Tag List

Results 1 to 7 of 7

Thread: "SMB3" Colored Block Style Platform :o

  1. #1
    Lynel
    Join Date
    Jan 2005
    Posts
    1,296
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,331
    Level
    18
    vBActivity - Bars
    Lv. Percent
    56.82%

    "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.

  2. #2
    &&
    ZC Developer
    Joe123's Avatar
    Join Date
    Sep 2006
    Age
    32
    Posts
    3,061
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    7,303
    Level
    26
    vBActivity - Bars
    Lv. Percent
    8.74%

    Re: "SMB3" Colored Block Style Platform :o

    A bit like the drop-through platforms at about 45 seconds in here?

  3. #3
    Lynel
    Join Date
    Jan 2005
    Posts
    1,296
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,331
    Level
    18
    vBActivity - Bars
    Lv. Percent
    56.82%

    Re: "SMB3" Colored Block Style Platform :o

    Yes. Exactly o-o

  4. #4
    &&
    ZC Developer
    Joe123's Avatar
    Join Date
    Sep 2006
    Age
    32
    Posts
    3,061
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    7,303
    Level
    26
    vBActivity - Bars
    Lv. Percent
    8.74%

    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.

  5. #5
    Lynel
    Join Date
    Jan 2005
    Posts
    1,296
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,331
    Level
    18
    vBActivity - Bars
    Lv. Percent
    56.82%

    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 :)

  6. #6
    &&
    ZC Developer
    Joe123's Avatar
    Join Date
    Sep 2006
    Age
    32
    Posts
    3,061
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    7,303
    Level
    26
    vBActivity - Bars
    Lv. Percent
    8.74%

    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.

  7. #7
    Lynel
    Join Date
    Jan 2005
    Posts
    1,296
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,331
    Level
    18
    vBActivity - Bars
    Lv. Percent
    56.82%

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social