Jump to content

Photo

ffc at link's position


  • Please log in to reply
6 replies to this topic

#1 Darkhogg

Darkhogg

    Initiate

  • Members
  • Location:Madrid

Posted 24 August 2007 - 02:35 PM

i'm trying to make a link's falling animation, and using ffc i get it, but is too static. i want to use zscript for put this animation at link's position. my ffc are:

1 -> shadow, simple combo positioned at link's floor position
2 -> link falling, animated combo with vertical acceleration (aka gravity icon_biggrin.gif)

and the room is a timed warp room that warps you into the real room

the big problem: I don't know nothing of zscript :\ can somebody help me?

#2 Mitchfork

Mitchfork

    no fun. not ever.

  • Members
  • Real Name:Mitch
  • Location:Alabama

Posted 24 August 2007 - 09:42 PM

You can actually do it without scripting. I'll explain:
Let's say you wanted to make Link be able to jump down a cliff in GB-style. All you do it make the top cliff edge combo a direct warp to an identical screen with sideview gravity on, and make the ending combo a direct warp back to the original screen. That way, Link falls down the cliff automatically until he hits bottom.

#3 Darkhogg

Darkhogg

    Initiate

  • Members
  • Location:Madrid

Posted 25 August 2007 - 05:02 AM

yeah, is correct. in two rooms, is how i've made that. but if link is at a dungeon room with a pit labyrinth, or something like this, in the room under it, i want the animation appears in the position that link's falling, like in GB when link walks in a pit =D

#4 Fuzzy

Fuzzy

    Wizard

  • Members
  • Real Name:Rachel
  • Location:Mississippi

Posted 17 September 2007 - 03:10 AM

I haven't played a GB Zelda, but I can inform you on LTTP pits.

Just have it so that when Link steps on the hole, he's warped to a screen that plays an animation of Link falling. (There are some good falling tiles here) You'll want the "Invisible Link" Screen Rule for the falling animation. Also make sure that the combo for the falling Link cycles to the transparent color.

Now, that screen can either timewarp back to the action, or you could have tilewarps surrounding the Invisible Link. Or both.

Also note that if you make a really long falling animation, it should be one of the last 2 choices, because then people will be able to skip through back to the dungeon, mountain, or wherever they fell from.

Finally, if you're going to make the pit lead somewhere useful, just create your falling animation, and have it warp there instead.


#5 Joe123

Joe123

    Retired

  • Members

Posted 17 September 2007 - 12:10 PM

But the falling animation wont always be where link is...

#6 Praethus

Praethus

    Lord of the Darkness

  • Members
  • Real Name:Eddie

Posted 04 October 2007 - 01:57 PM

If you are talking about falling from the top of the screen, that is easily accomplished. If you set Link's Z variable to something higher than 0 in a script, the game will naturally make him fall back down to 0.

#7 Joe123

Joe123

    Retired

  • Members

Posted 04 November 2007 - 02:43 PM

I thought that I might be gravedigging here, but according to the rules that's only after two months so I'm not.

I've made a script for bottomless holes:
CODE
ffc script hole{
    void run(int btrtx, int btrty, int warpx, int warpy, int tile){
        int timer;
        int x;
        int y;
        int invis = 131; //set this integer to your invisible Link Tile Modifier item
        int sfx = 74; // set this integer to the sound effect you want to play
        int switch = 0;
        if(warpx == 0 && warpy == 0){Waitframes(5); warpx = Link->X; warpy = Link->Y;}
        if(tile == 0){tile = 9186;} // set the number in the '{}' here to what you want the first frame of your falling animation to be
        int orig = Screen->ComboT[ComboAt(warpx,warpy)];

        while(true){
            if((Link->X >= this->X) && (Link->Y >= this->Y) && (Link->X <= btrtx) && (Link->Y <= btrty) && Link->Z == 0){
                for(timer = 0; timer < 40; timer++){
                    if(switch == 0){Game->PlaySound(sfx); switch = 1; x = Link->X; y = Link->Y;}
                    Link->Item[invis] = true;
                    Link->Item[I_CLOCK] = true;
                    Link->InputA = false;
                    Link->InputB = false;
                    Link->InputL = false;
                    Link->InputLeft = false;
                    Link->InputRight = false;
                    Link->InputUp = false;
                    Link->InputDown = false;
                    Screen->DrawTile(2, x, y, tile+Floor(timer/8), 1, 1, 6, 1, 0, 0, 0, 0, true, 128);
                Waitframe();
                }
                for(timer = 0; timer < 2; timer++){
                    switch = 0;
                    Link->Item[I_CLOCK] = false;
                    Link->Item[invis] = false;
                    Link->X = warpx;
                    Link->Y = warpy;
                    Link->InputA = false;
                    Link->InputB = false;
                    Link->InputL = false;
                    Link->InputLeft = false;
                    Link->InputRight = false;
                    Link->InputUp = false;
                    Link->InputDown = false;
                    Screen->ComboT[ComboAt(warpx,warpy)] = 31;
                Waitframe();
                }
            Screen->ComboT[ComboAt(warpx,warpy)] = orig;
            }
        Waitframe();
        }
    }
}


What it does is:
Check whether Link is within a certain square, make sure he's not jumping, then make him invisible, play an animation of him falling where he was standing and play a sound effect, then put him at the place where he entered the screen, make him visible and set the combo to a damage combo for 2 frames, then change it back.

Some setup is required:
You will have to make a custom item that gives Link a Link Tile Modifier to move his sprites along so that he is invisible.
I'm not explaining how to do this, because I've submitted a script to the expo that relies on the same item, and there's an explanation there.

You'll need some tiles for Link falling, and to set the number of the first tile of the animation (no greater than 5 tiles of animation) in the specified place in the script.

You need to set the ffc with the script to the top-left corner of where the hole is to be, and (D0,D1) to be the coordinates of the bottom-right corner.

(D2,D3) are the coordinates of a specified place for Link to respawn at. If you don't set anywhere, he respawns where he entered the screen.

D4 is a way to change the animation for Link falling, so you can use a different animation on on a different screen if you so desire. However, where you set the integer for it in the script (it's noted via '//'), if you leave D4 to be '0', it'll use that value.

Edited by Joe123, 07 November 2007 - 02:57 AM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users