So, I got a ladderscript for my quest which makes an functional ladder in sideview gravity. Now this works very fine, but Link's animation is screwed up when he goes over the ladder.
Here is the script:
Code:
import "std.zh"
//Courtesy of Saffith, beefster09, and pkmnfrk
bool isSolid(int x, int y) {
if(x<0 || x>255 || y<0 || y>175) return false;
int mask=1111b;
if(x % 16 < 8)
mask &= 0011b;
else
mask &= 1100b;
if(y % 16 < 8)
mask &= 0101b;
else
mask &= 1010b;
int ret = Screen->ComboS[ComboAt(x, y)] & mask;
return (ret!=0);
}
ffc script ladder {
void run(int f) {
if(f == 0) f = 98;
while(true) {
if(Screen->ComboF[ComboAt(Link->X+8, Link->Y)] == f) {
if(Link->Jump < 0) Link->Jump = 0;
if(Link->InputDown) {
if(!isSolid(Link->X, Link->Y + 1)) Link->Y += 1;
}
if(Link->InputUp) {
if(!isSolid(Link->X, Link->Y - 1)) Link->Y -= 1;
}
}
Waitframe();
}
}
}
Here is a simple test demo, to confirm the bug:
Quest File(Ignore the enemies, as they will be for another bug I'll post here too)
Bug is found in Build 846.
Edit: Someone also checked for me if the script doesn't change animation, it doesn't so that's why this belongs here.