Ah. I thought it would make sense to input the coordinates via arguments, but then when it didn't compile properly I thought that would be because I had to input them into the script somewhere.
Thanks a lot.
EDIT: the one without the dummy item compiles and everything fine, but then when you try to use it, Link has the moving upwards sprite overlayed transparently over the moving downwards sprite, and can't move down. And if you have a ladder more than one tile wide, Link can't walk between the
two rows horizontally, just won't work
The one with the dummy item still won't compile after removing that comma, apparently there is an error to do with the 'Dummy_item_id' variable being undeclared.
EDIT 2:OK, I've worked out the dummy item script now, and it works fine. You'd missed the 'int dummy_item_id' variable in the void_run command, which meant it wouldn't compile, and being a rather new to scripting (and 2.5 betas for that matter) I didn't think to actaully make the dummy item, and give it a number in the script. All works fine and dandy now though. Although the other script doesn't.
EDIT 3: OK, actaully it doesn't work fine and dandy. I've set the coordinates for the top left of the ladder, but the script seems to carry on to the top of the screen for no apparent reason.
EDIT 3:I've fixed the script:
ffc script climbing_dummy_item{
void run(int top_left_x, int top_left_y, int bottom_right_x, int bottom_right_y, int max_y, int dummy_item_id){ dummy_item_id = 0; // Replace this 0 with the number of the dummy
// item that has been made with a link tile mod.
while(true){
// Is the player within the rectangle specified in the data?
// ----------------------
if( (Link->X >= top_left_x) && (Link->X <= bottom_right_x) &&
(Link->X >= top_left_y) && (Link->Y <= bottom_right_y) && (Link->Y >= max_y)){
if(!Link->Item[dummy_item_id]){ Link->Item[dummy_item_id] = true;}
Link->InputA = false;
Link->InputB = false;
}else{
if(Link->Item[dummy_item_id]){ Link->Item[dummy_item_id] = false;}
}
Waitframe();
} // end of while loop
} // end of void run
}
😊
And to have two different ladders on one screen, I found it necessary to have more two dummy items, identical apart from reference number, and having two scripts - one with each item number.