Well you'd hope that no-one'd get confused by it, it's just wrong.
void run(int itm, int dly, int enemies, int holdup, int perm, int d, int z){
if(enemies != 0) dly = 4;
Waitframes(dly);
if(perm > 0 && GetScreenDBit(d,perm)) return;
while(enemies != 0 && Screen->NumNPCs() > 0) Waitframe();
item i = CreateItemAt(itm,this->X,this->Y);
if(holdup) i->Pickup |= IP_HOLDUP;
while(i->isValid()){
i->Z = z; i->Jump = 0;
Screen->DrawTile(3,i->X,i->Y+2-i->Z,i->Tile,1,1,i->CSet,-1,-1,-1,1,0,0,true,128);
Waitframe();
}
if(perm != 0) SetScreenDBit(d,perm,true);
}
}
Drawing two sprites is intentional, I just got one of the in the wrong place. Try that, it might be one or two pixels out but I think it's right.
Yep it was 2pixels off but I figured out how to edit that much haha so
void run(int itm, int dly, int enemies, int holdup, int perm, int d, int z){
if(enemies != 0) dly = 4;
Waitframes(dly);
if(perm > 0 && GetScreenDBit(d,perm)) return;
while(enemies != 0 && Screen->NumNPCs() > 0) Waitframe();
item i = CreateItemAt(itm,this->X,this->Y);
if(holdup) i->Pickup |= IP_HOLDUP;
while(i->isValid()){
i->Z = z; i->Jump = 0;
Screen->DrawTile(3,i->X,i->Y-i->Z,i->Tile,1,1,i->CSet,-1,-1,-1,1,0,0,true,128);
Waitframe();
}
if(perm != 0) SetScreenDBit(d,perm,true);
}
}
that works, link will walk under it, and can jump and grab it and it returns each time, so all works as needed, thanks.