Should I paste it there?
You mean the normal ladder script? ..or my whole script including it?
That's the normal ladder script (sorry the command was "Import" not "include" LinkMovement.zh
import "LinkMovement.zh"
const int ComboType_NormalLadder = 143; //combo type for ladders. "script 1" by default. see std_constants.zh for a list of combo types.
global script NormalLadder{
void run(){
LinkMovement_Init();
bool OnNormalLadder;
while(true){
LinkMovement_Update1();
if ( Screen->ComboT[ComboAt(Link->X+8, Link->Y+8)] == ComboType_NormalLadder ) {
OnNormalLadder = true;
//disable A and B
Link->InputA = false; Link->PressA = false;
Link->InputB = false; Link->PressB = false;
//slow down link
LinkMovement_AddLinkSpeedBoost(-0.5);
}
else
OnNormalLadder = false;
Waitdraw();
LinkMovement_Update2();
if ( OnNormalLadder )
Link->Dir = DIR_UP; //make link face up
Waitframe();
}
}
}
there's another global script (without slow walk) that doesen't ue "LinkMovement.zh"
That version is compiling succesful when I combine it, with my global script.
My set up (combo Type) was correct, but it seems to do nothing (while all other global functions DayNight, MooshPit, FlowingWater etc, work perfect).
it's this one...
const int ComboType_NormalLadder = 143; //combo type for ladders. "script 1" by default. see std_constants.zh for a list of combo types.
global script NormalLadder{
void run(){
while(true){
if ( Screen->ComboT[ComboAt(Link->X+8, Link->Y+8)] == ComboType_NormalLadder ) {
//disable A and B
Link->InputA = false; Link->PressA = false;
Link->InputB = false; Link->PressB = false;
}
Waitdraw();
if ( Screen->ComboT[ComboAt(Link->X+8, Link->Y+8)] == ComboType_NormalLadder ) {
Link->Dir = DIR_UP; //make link face up
}
Waitframe();
}
}
}
I already changed it to "scripts 2" combo type, in my script.
So I also edited it in the post
Edited by Bagu, 31 December 2019 - 10:44 PM.