PDA

View Full Version : Link is too white to jump



Majora
09-25-2012, 03:20 PM
but on a serious note, can anyone help me out with this:


if(Link->Item[I_ROCSFEATHER])

{

if(IsSideview() && (Link->PressEx1 && OnSidePlatform(Link->X, Link->Y)))
{
Link->Jump = JUMP_POWER;
Game->PlaySound(45);
}

else if (Link->PressEx1 && !IsSideview() && Link->Z == 0)
{
Link->Jump = JUMP_POWER;
Game->PlaySound(45);
}

}

The issue being that I basically want link to be able to jump so long as he is ON a solid combo in sideview. as it is, he refuses to jump if his hitbox is sticking out of the solid combo even one bit. The URLS of these screenshots are self-explanatory:

https://dl.dropbox.com/u/10691609/ZCSS/WillJump.png

https://dl.dropbox.com/u/10691609/ZCSS/WontJump.png

I am editing the quest in RC2 and playing it in whatever the latest one is. RC4? diagonal movement is turned off. Tacking on a plus/minus (some number) to Link->X seems to KIND of fix it but I basically want this script to do exactly:

When link is in sideview, he has the ability to jump ONLY when he is standing (no matter how much of his hitbox is protruding from the platform, so long as he is still standing on it) on solid ground. So I guess the limit somewhere would be 16 pixels? Bleh.

CJC
09-27-2012, 10:24 PM
if(Link->Item[I_ROCSFEATHER])

{

if(IsSideview() && (Link->PressEx1 && OnSidePlatform(Link->X || Link->X+8 || Link X+15, Link->Y)))
{
Link->Jump = JUMP_POWER;
Game->PlaySound(45);
}

else if (Link->PressEx1 && !IsSideview() && Link->Z == 0)
{
Link->Jump = JUMP_POWER;
Game->PlaySound(45);
}

}


I believe Link's "X" coordinate only refers to the left side of his hitbox. If you have the code check for the center of his hitbox and the other end (With the two "OR" statements I added to your code), it might help.
...It may also need a "Link->X+7" in there, or even a 'for' loop that goes from 0 to 15. But try this to start.