Okie dokie. I've made the script create an item at Link's location, rather than just GIVING him the item, because that way you can use screen flags to have Link hold it up if you like.
Code:
// ================================
// pushA_getitem = This script will check the
// player's location when they push the A button.
// if the A button is pressed while the player
// is within 16 pixels of the FFC, the game will
// create an item at Link's location. The FFC will
// only do this if Link has a specified precursor item.
// The script will only trigger once, until Link exits
// and re-enters the screen.
// D0 = The item to be created.
// D1 = An item necessary to get the new one.
// Set to zero if you don't want there to be
// any precursor item.
// ================================
ffc script pushA_getitem{
void run( int item, int pre_item ){
int wastriggered = 0; // whether or not the script has created an item yet.
while(true){
if ( (Link->InputA) && ( (Link->Item[pre_item]) || (pre_item == 0) ) && (Link->X < this->X+16) && (Link->X > this->X-1) && (Link->Y < this->Y+16) && (Link->Y > this->Y-1) && (wastriggered == 0)){
item new_item = Screen->CreateItem(item);
new_item->X = Link->X;
new_item->Y = Link->Y;
} // end of if
Waitframe();
}
} // end of void run
} // end of ffc script
Havn't tried complining it, but that should work.