Jump to content

Photo

Tall Push Combo

FFC

  • Please log in to reply
No replies to this topic

#1 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Gender:Female
  • Location:Rainbow Factory

Posted 13 December 2013 - 03:20 PM

Tall Push Combos

 
Description
 
Allows for a freeform combo to move along with it's base. Giving the visual effect of a tall pillar.
 
Code
 
//Add this line once at the top of your script file.
import "std.zh"
 
ffc script TallPushCombo
{
    void run()
    {
        while(true)
        {
            while(Screen->ComboD[ComboAt(this->X, this->Y+(this->TileHeight*16))] != Screen->UnderCombo)
                Waitframe();
 
            //We need to know what direction the block is going to move ahead of time as waitdraw cannot be used.
            float xstep;
            float ystep;
            if(Link->Dir==DIR_UP)
               ystep = -.5;
            else if(Link->Dir==DIR_DOWN)
               ystep = .5;
            else if(Link->Dir==DIR_LEFT)
               xstep = -.5;
            else if(Link->Dir==DIR_RIGHT)
               xstep = .5;
            for(int i; i < 32; i++) //Blocks are pushed for 32 frames.
            {
                this->X += xstep;
                this->Y += ystep;
                Waitframe();
            }
            this->X = GridX(this->X);
            this->Y = GridY(this->Y);
            Waitframe();
        }
    }
}
 
Setup
 
Place ffc on the screen above the pushable combo so it's aligned on the combo grid. It can be up to 4 tiles high and should have overlay flag set. Set it's TileHeight so the ffc's bottom is touching; but not overlapping the base combo. Then attach the script and apply a push flag to the base combo and your ready to go. NOTE: The base combo is the Push Block placed on the screen NOT the ffc.
 
Resources
 
Requires std.zh which is included with zc.




Also tagged with one or more of these keywords: FFC

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users