Jump to content

Photo

LA style sideview ladders?


  • Please log in to reply
40 replies to this topic

#1 Old-Skool

Old-Skool

    Hero of Time

  • Members
  • Location:Missouri

Posted 20 March 2011 - 07:57 PM

In Link's Awakening, sideview gravity areas generally don't allow you to simply walk up, unless you're touching a ladder. Is it possible to script a combo which basically recreates this same effect?

#2 Chakaa

Chakaa

    Hench 4 Life

  • Members
  • Real Name:Mark
  • Location:Massachusetts

Posted 20 March 2011 - 07:59 PM

I think one was made, but it was really glitchy so it was never released. I remember reading about it in a similar thread a while ago. A new version might be more stable in Beta 18 though....

#3 lucas92

lucas92

    Defender

  • Members

Posted 20 March 2011 - 08:23 PM

Try this:

CODE
ffc script sideview_laddermodifier
{
    void run()
    {
        int link_lastdirection = Link->Dir;
        while(true)
        {
            if(Link->Dir == DIR_UP && Screen->isSolid(Link->X,Link->Y - 16))
            {
                Waitdraw();
                Link->Dir = link_lastdirection;
            }
            link_lastdirection = Link->Dir;
            Waitframe();
        }
    }
}


#4 Dawnlight

Dawnlight

    My name is NOT Jason!

  • Members
  • Real Name:Justin
  • Location:Chicago, IL

Posted 20 March 2011 - 09:29 PM

I think a "No Gravity" combo type is in high demand for the ZC developers.

#5 Isdrakthül

Isdrakthül

    Apprentice

  • Members

Posted 20 March 2011 - 11:46 PM

Here's one that doesn't use an FFC.
CODE

int SaveX;
int SaveY;
int SaveS;
int SaveM;
bool WasOnLadder = false;

bool HookGrab(){
    int HSFor;
    for(HSFor = 1; HSFor <= Screen->NumLWeapons(); HSFor++){
        lweapon HSCheck = Screen->LoadLWeapon(HSFor);
        if(HSCheck->ID == LW_HOOKSHOT && Screen->ComboT[ComboAt (HSCheck->X, HSCheck->Y)] == CT_HSGRAB || Screen->ComboT[ComboAt (HSCheck->X+15, HSCheck->Y)] == CT_HSGRAB || Screen->ComboT[ComboAt (HSCheck->X, HSCheck->Y+15)] == CT_HSGRAB || Screen->ComboT[ComboAt (HSCheck->X+15, HSCheck->Y+15)] == CT_HSGRAB){
            return(true);
        }
    }
    return(false);
}

bool OnLadder()
{
    if(Screen->ComboT[ComboAt (Link->X, Link->Y+8)] == CT_SCRIPT1 || Screen->ComboT[ComboAt (Link->X+15, Link->Y+8)] == CT_SCRIPT1 || Screen->ComboT[ComboAt (Link->X, Link->Y+17)] == CT_SCRIPT1 || Screen->ComboT[ComboAt (Link->X+15, Link->Y+17)] == CT_SCRIPT1){
        return(true);
    }
    return(false);
}

bool OnLadderDown()
{
    if(Screen->ComboT[ComboAt (Link->X, Link->Y+8)] != CT_SCRIPT1 && Screen->ComboT[ComboAt (Link->X+15, Link->Y+8)] != CT_SCRIPT1 && (Screen->ComboT[ComboAt (Link->X, Link->Y+17)] == CT_SCRIPT1 || Screen->ComboT[ComboAt (Link->X+15, Link->Y+17)] == CT_SCRIPT1)){
        return(true);
    }
    return(false);
}

bool isLSolidHorz(int y)
{
    int x;
    for(x=Link->X; x<=Link->X+16; x+=8)
    {
        if(x==Link->X+16) x--;
        if(Screen->isSolid(x, y)) return(true);
    }
    return(false);
}

bool isFiringHS(){
    int HSFor;
    for(HSFor = 1; HSFor <= Screen->NumLWeapons(); HSFor++){
        lweapon HSCheck = Screen->LoadLWeapon(HSFor);
        if(HSCheck->ID == LW_HOOKSHOT){
            return(true);
        }
    }
    return(false);
}

bool isJumping(){
    if((GetEquipmentA() == I_ROCSFEATHER && Link->InputA == true) || (GetEquipmentB() == I_ROCSFEATHER && Link->InputB == true) || Link->Jump > 1){
        return(true);
    }
    return(false);
}

global script Slot2{
    void run(){
    while(true){
        if(Game->GetCurDMapScreen()!=SaveS || Game->GetCurDMap()!=SaveM){
            if(Link->Action==LA_SCROLLING) Waitframes(49);
            SaveX=Link->X;
            SaveY=Link->Y;
        }
        if(OnLadder() == true && HookGrab() == false && isJumping() == false){
            if(WasOnLadder == false){
                Link->Jump = 1;
                if(OnLadderDown()){
                    Link->Y++;
                    SaveY = Link->Y;
                }
            }
            else{
                Link->Jump = 0;
            }
            if(!isFiringHS()){
                if(Link->InputUp == true && !isLSolidHorz(Link->Y+7)){
                    SaveY--;
                }
                else if(Link->InputDown == true && !isLSolidHorz(Link->Y+16)){
                    SaveY++;
                }
                if(Link->InputLeft == true && !Screen->isSolid(Link->X-1, Link->Y+8) && !Screen->isSolid(Link->X-1, Link->Y+15)){
                    SaveX--;
                }
                else if(Link->InputRight == true && !Screen->isSolid(Link->X+16, Link->Y+8) && !Screen->isSolid(Link->X+16, Link->Y+15)){
                    SaveX++;
                }
            }
            Link->X = SaveX;
            Link->Y = SaveY;
            WasOnLadder = true;
        }
        else{
            if(WasOnLadder == true){
                Link->Jump = 0;
                WasOnLadder = false;
            }
            SaveX = Link->X;
            SaveY = Link->Y;
        }
        SaveS=Game->GetCurDMapScreen();
        SaveM=Game->GetCurDMap();
        Waitframe();
    }
    }
}

item script Roc{
    void run(){
        if(OnLadder() == true){
            Link->Jump = 3;
        }
    }
}

It uses Script 1 combos as ladder combos. Using the Roc's Feather while on the ladder causes Link to let go unless the Roc script is attached to it..

Edited by Isdrakthül, 26 July 2011 - 09:18 AM.


#6 Old-Skool

Old-Skool

    Hero of Time

  • Members
  • Location:Missouri

Posted 19 July 2011 - 07:41 PM

Nice, but... Is there a way to make it a flag instead?

#7 Mero

Mero

    Touch Fluffy Tail

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

Posted 19 July 2011 - 07:49 PM

QUOTE(King Aquamentus @ Jul 19 2011, 06:41 PM) View Post

Nice, but... Is there a way to make it a flag instead?


Sure is, just replace the combo comparison with a flag comparison and it should work just find. Would you like me to do that for you King Aquamentus.

#8 Old-Skool

Old-Skool

    Hero of Time

  • Members
  • Location:Missouri

Posted 19 July 2011 - 08:04 PM

That's ok, I think this script, while excellent for what it is, isn't what I'm looking for right now. Right now, I'm modding one of Joe123's ladder scripts, which for some reason makes Link seizure into jumping sprites and standing sprites over and over, while moving slowly up or down. Assumedly, this is because Link is having trouble *not falling*

I'm going with that ladder over this one not just for being a flag, but because it prevents jumping at all when in use, and it'll be easier to make Link always face downward, no matter if he's going up or down (which is what I"m going for.)

Edited by King Aquamentus, 19 July 2011 - 08:20 PM.


#9 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 19 July 2011 - 08:38 PM

I really don't get why a ladder script is needed. Can't you just use direct warps to toggle the gravity on and off? icon_shrug.gif

#10 Old-Skool

Old-Skool

    Hero of Time

  • Members
  • Location:Missouri

Posted 19 July 2011 - 08:51 PM

QUOTE(Pokemonmaster64 @ Jul 19 2011, 08:38 PM) View Post

I really don't get why a ladder script is needed. Can't you just use direct warps to toggle the gravity on and off? icon_shrug.gif


The thread is pertaining to scripts for one, not why we need it.

#11 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 19 July 2011 - 09:04 PM

I was giving an alternative to scripting that can accomplish the same goal. Just because it can be done with scripts doesn't mean it needs to be...

#12 Old-Skool

Old-Skool

    Hero of Time

  • Members
  • Location:Missouri

Posted 19 July 2011 - 09:33 PM

QUOTE(Pokemonmaster64 @ Jul 19 2011, 09:04 PM) View Post

I was giving an alternative to scripting that can accomplish the same goal. Just because it can be done with scripts doesn't mean it needs to be...


Which is not the case, here. We do not want to warp to create the effect. We want it on hand without having to copypaste screens. I'm building a tileset for members here, and asking them to make a double of a screen is not something I am going to do.


Isdrakthul, why would your script only name itself halfway down? I think there's something wrong with it. Besides, assembled like that, it doesn't combine right with other global scripts. Additionally, in LA, using the rocs feather did *not* cause Link to let go. It just bumped him up a little (like using the rocs feather in ZC when you're stuck in a wall.)

Edited by King Aquamentus, 19 July 2011 - 09:44 PM.


#13 Isdrakthül

Isdrakthül

    Apprentice

  • Members

Posted 21 July 2011 - 10:00 AM

It names itself halfway down because everything above that is a function. These particular functions should be placed outside the main global script. As for the jumping, it will actually jump if you attach the Roc script to it.

I'll work on making this LA-like when I get the chance.

EDIT: Could you provide a link to a video of the Roc's Feather being used on an LA ladder? I haven't been able to find one.

Edited by Isdrakthül, 21 July 2011 - 01:20 PM.


#14 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 21 July 2011 - 10:32 AM

EDIT: Accidentally repeated Pokemonmaster64's suggestion, sorry.

Edited by Cukeman, 21 July 2011 - 10:35 AM.


#15 Old-Skool

Old-Skool

    Hero of Time

  • Members
  • Location:Missouri

Posted 23 July 2011 - 01:54 PM

Isdrakthul, there's a bit of a problem with your script, when scrolling to another screen. Have you tested it for this?

Edited by King Aquamentus, 23 July 2011 - 02:06 PM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users