Jump to content

Photo

Looking for a script that makes Link jump/climb up only certain mounta


  • Please log in to reply
6 replies to this topic

#1 Jared

Jared

    Deified

  • Members
  • Real Name:Jared
  • Pronouns:He / Him
  • Location:New Hampshire

Posted 11 December 2010 - 06:54 PM

Sort of like Ocarina of time. Is there a way this is possible?

#2 Geoffrey

Geoffrey

    Chosen One

  • Members

Posted 11 December 2010 - 08:20 PM

Jump yes, climb no.

I believe it was by beefster, but it's not in the DB and wouldn't work in the newer builds (for me, anyways). Also, it was set up via FFCs, so it would be difficult to have an entire cliff face jumpable.

EDIT: Knock yourself out.
CODE

//Ledge
//Link will jump off the ledge only when in the specified direction
//D0: All acceptable directions in a masked format:
//Up = 1;
//Down = 2;
//Left = 4;
//Right = 8;
//D1: Minimum direction hold time
//D2: Sound to be played when hopping the ledge
//All other properties are absorbed from the ffc, namely EffectHeight and EffectWidth
const float GRAV=.16; //Insert your game's gravity constant here. (.16 by default)

ffc script Ledge{

    void run(int dir, int hold, int SFX) {

        bool canJump;
        int counter=0;

        while(true) {

            if((dir & 0001b) != 0) {
                canJump = Link->InputUp && !Link->InputDown;
                canJump &&= (Link->X >= this->X-4) && (Link->X <= this->X+this->EffectWidth-12);
                canJump &&= (Link->Y <= this->Y+this->EffectHeight+8) && (Link->X >= this->X+this->EffectHeight+4);
                while(canJump && counter<hold) {
                    counter++;
                    Waitframe();
                    canJump &&= Link->InputUp && !Link->InputDown;
                }
                counter = 0;
                if(canJump) {
                    Link->Jump = ((this->EffectHeight+8)/2)*GRAV;
                    Game->PlaySound(SFX);
                    for(int i=0;i<this->EffectHeight+8;i++) {
                        Link->Y--;
                        Link->InputUp = false;
                        Link->InputDown = false;
                        Link->InputLeft = false;
                        Link->InputRight = false;
                        Link->InputA = false;
                        Link->InputB = false;
                        Link->InputR = false;
                        Link->InputL = false;
                        Waitframe();
                    }
                }
            } if((dir & 0010b) != 0) {
                canJump = Link->InputDown && !Link->InputUp;
                canJump &&= (Link->X >= this->X-4) && (Link->X <= this->X+this->EffectWidth-12);
                canJump &&= (Link->Y >= this->Y-16) && (Link->Y <= this->Y-12);
                while(canJump && counter<hold) {
                    counter++;
                    Waitframe();
                    canJump &&= Link->InputDown && !Link->InputUp;
                }
                counter = 0;
                if(canJump) {
                    Link->Jump = ((this->EffectHeight+8)/2)*GRAV;
                    Game->PlaySound(SFX);
                    for(int i=0;i<this->EffectHeight+8;i++) {
                        Link->Y++;
                        Link->InputUp = false;
                        Link->InputDown = false;
                        Link->InputLeft = false;
                        Link->InputRight = false;
                        Link->InputA = false;
                        Link->InputB = false;
                        Link->InputR = false;
                        Link->InputL = false;
                        Waitframe();
                    }
                }
            } if((dir & 0100b) != 0) {
                canJump = Link->InputLeft && !Link->InputRight;
                canJump &&= (Link->Y >= this->Y-4) && (Link->Y <= this->Y+this->EffectHeight-12);
                canJump &&= (Link->X <= this->X+this->EffectWidth+16) && (Link->X >= this->X+this->EffectWidth+12);
                while(canJump && counter<hold) {
                    counter++;
                    Waitframe();
                    canJump &&= Link->InputLeft && !Link->InputRight;
                }
                counter = 0;
                if(canJump) {
                    Link->Jump = ((this->EffectWidth+16)/2)*GRAV;
                    Game->PlaySound(SFX);
                    for(int i=0;i<this->EffectWidth+16;i++) {
                        Link->X--;
                        Link->InputUp = false;
                        Link->InputDown = false;
                        Link->InputLeft = false;
                        Link->InputRight = false;
                        Link->InputA = false;
                        Link->InputB = false;
                        Link->InputR = false;
                        Link->InputL = false;
                        Waitframe();
                    }
                }
            } if((dir & 1000b) != 0) {
                canJump = Link->InputRight && !Link->InputLeft;
                canJump &&= (Link->Y >= this->Y-4) && (Link->Y <= this->Y+this->EffectHeight-12);
                canJump &&= (Link->X >= this->X-16) && (Link->X <= this->X-12);
                while(canJump && counter<hold) {
                    counter++;
                    Waitframe();
                    canJump &&= Link->InputRight && !Link->InputLeft;
                }
                counter = 0;
                if(canJump) {
                    Link->Jump = ((this->EffectWidth+16)/2)*GRAV;
                    Game->PlaySound(SFX);
                    for(int i=0;i<this->EffectWidth+16;i++) {
                        Link->X++;
                        Link->InputUp = false;
                        Link->InputDown = false;
                        Link->InputLeft = false;
                        Link->InputRight = false;
                        Link->InputA = false;
                        Link->InputB = false;
                        Link->InputR = false;
                        Link->InputL = false;
                        Waitframe();
                    }
                }
            }
    
            Waitframe();
        }
    }
}


Edit 2: Alternatively, there is this one in the DB, but I could never figure out how to get it to work.

Edited by Molten Onyx, 11 December 2010 - 08:25 PM.


#3 Jared

Jared

    Deified

  • Members
  • Real Name:Jared
  • Pronouns:He / Him
  • Location:New Hampshire

Posted 11 December 2010 - 08:54 PM

Compiled the script, but nothing's happening. Do I need the Roc's Feather?

#4 Nightmeres

Nightmeres

    Defender

  • Members

Posted 11 December 2010 - 09:19 PM

not that i know of does he? icon_confused.gif

#5 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 12 December 2010 - 09:30 AM

I'm pretty sure completely confident that you don't need Roc's feather. That's an FFC script, so did you set up the FFC properly on the screen you want it on?

Edit: MO said that this script
QUOTE
wouldn't work in the newer builds
, so why don't you try the other one he provided?

Edited by MoscowModder, 12 December 2010 - 09:32 AM.


#6 Jared

Jared

    Deified

  • Members
  • Real Name:Jared
  • Pronouns:He / Him
  • Location:New Hampshire

Posted 12 December 2010 - 02:20 PM

Theres a newer vone that work? Can I have it?

#7 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 13 December 2010 - 09:48 AM

I can't guarantee that any script will work, but MO pointed out another script in the DB at http://www.purezc.co...showtopic=43831.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users