yea I need the X to be 0 for each slot and the y to change. The OP has it set to a constant y and changes the x position. That’s what this was doing on the collision part so I just set the slot_x and y manually.
else if((tft.solid[i].spritecol == cabbot) && room == 4 && Active_slot == 1 && (ButtonB.fallingEdge()) && item_1 == 1) {tft.popup(F(" ""You got an item!"" "),20); item_1 = 3, S1=1, slot1_x, slot1_y, return true;}
heres what I have adapted so far. Always looking for a better way.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(S1==0 && S2==0 && S3==0 && S4==0 && S5==0 && S6==0 && S7==0 && S8==0 && S9==0 && S10==0){Active_slot = 1;}
else if(S1==1 && S2==0 && S3==0 && S4==0 && S5==0 && S6==0 && S7==0 && S8==0 && S9==0 && S10==0){Active_slot = 2;}
else if(S1==1 && S2==1 && S3==0 && S4==0 && S5==0 && S6==0 && S7==0 && S8==0 && S9==0 && S10==0){Active_slot = 3;}
else if(S1==1 && S2==1 && S3==1 && S4==0 && S5==0 && S6==0 && S7==0 && S8==0 && S9==0 && S10==0){Active_slot = 4;}
else if(S1==1 && S2==1 && S3==1 && S4==1 && S5==0 && S6==0 && S7==0 && S8==0 && S9==0 && S10==0){Active_slot = 5;}
else if(S1==1 && S2==1 && S3==1 && S4==1 && S5==1 && S6==0 && S7==0 && S8==0 && S9==0 && S10==0){Active_slot = 6;}
else if(S1==1 && S2==1 && S3==1 && S4==1 && S5==1 && S6==1 && S7==0 && S8==0 && S9==0 && S10==0){Active_slot = 7;}
else if(S1==1 && S2==1 && S3==1 && S4==1 && S5==1 && S6==1 && S7==1 && S8==0 && S9==0 && S10==0){Active_slot = 8;}
else if(S1==1 && S2==1 && S3==1 && S4==1 && S5==1 && S6==1 && S7==1 && S8==1 && S9==0 && S10==0){Active_slot = 9;}
else if(S1==1 && S2==1 && S3==1 && S4==1 && S5==1 && S6==1 && S7==1 && S8==1 && S9==1 && S10==0){Active_slot = 10;}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int slot1_x = 0;
int slot1_y = 48;
int slot2_x = 0;
int slot2_y = 64;
int slot3_x = 0;
int slot3_y = 80;
int slot4_x = 0;
int slot4_y = 96;
int slot5_x = 0;
int slot5_y = 112;
int slot6_x = 0;
int slot6_y = 128;
int slot7_x = 0;
int slot7_y = 144;
int slot8_x = 0;
int slot8_y = 160;
int slot9_x = 0;
int slot9_y = 176;
int slot10_x = 0;
int slot10_y = 192;
int slot11_x = 0;
int slot11_y = 208
int Active_slot;
int S1 = 0;
int S2 = 0;
int S3 = 0;
int S4 = 0;
int S5 = 0;
int S6 = 0;
int S7 = 0;
int S8 = 0;
int S9 = 0;
int S10 = 0;
int menu_1 = 1;
int item_1 = 1;
int item_2 = 1;
int item_3 = 1;
int item_4 = 1;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if (ButtonA.fallingEdge()){menu_1;}
if(menu_1){
tft.writeRectNBPP(0,0,16,16,4,itemmenutop,palette);
tft.writeRectNBPP(0,32,16,16,4,itemmenu2,palette);
tft.writeRectNBPP(0,48,16,16,4,itemmenu3,palette);
tft.writeRectNBPP(0,224,16,16,4,itemmenu4,palette);
};
if((menu_1 == 3 && item_1 == 3 && Active_slot==1) || (menu_1 == 5 && item_1 == 3 && Active_slot==1)){tft.writeRectNBPP(slot1_x,slot1_y,114,16,4,item_1);}
if((menu_1 == 3 && item_1 == 3 && Active_slot==2) || (menu_1 == 5 && item_1 == 3 && Active_slot==2)){tft.writeRectNBPP(slot1_x,slot1_y,114,16,4,item_1);}
if((menu_1 == 3 && item_1 == 3 && Active_slot==3) || (menu_1 == 5 && item_1 == 3 && Active_slot==3)){tft.writeRectNBPP(slot1_x,slot1_y,114,16,4,item_1);}
if((menu_1 == 3 && item_1 == 3 && Active_slot==4) || (menu_1 == 5 && item_1 == 3 && Active_slot==4)){tft.writeRectNBPP(slot1_x,slot1_y,114,16,4,item_1);}
if((menu_1 == 3 && item_1 == 3 && Active_slot==5) || (menu_1 == 5 && item_1 == 3 && Active_slot==5)){tft.writeRectNBPP(slot1_x,slot1_y,114,16,4,item_1);}
if((menu_1 == 3 && item_1 == 3 && Active_slot==6) || (menu_1 == 5 && item_1 == 3 && Active_slot==6)){tft.writeRectNBPP(slot1_x,slot1_y,114,16,4,item_1);}
if((menu_1 == 3 && item_1 == 3 && Active_slot==7) || (menu_1 == 5 && item_1 == 3 && Active_slot==7)){tft.writeRectNBPP(slot1_x,slot1_y,114,16,4,item_1);}
if((menu_1 == 3 && item_1 == 3 && Active_slot==8) || (menu_1 == 5 && item_1 == 3 && Active_slot==8)){tft.writeRectNBPP(slot1_x,slot1_y,114,16,4,item_1);}
if((menu_1 == 3 && item_1 == 3 && Active_slot==7) || (menu_1 == 5 && item_1 == 3 && Active_slot==7)){tft.writeRectNBPP(slot1_x,slot1_y,114,16,4,item_1);}
if((menu_1 == 3 && item_1 == 3 && Active_slot==8) || (menu_1 == 5 && item_1 == 3 && Active_slot==8)){tft.writeRectNBPP(slot1_x,slot1_y,114,16,4,item_1);}
if((menu_1 == 3 && item_1 == 3 && Active_slot==9) || (menu_1 == 5 && item_1 == 3 && Active_slot==9)){tft.writeRectNBPP(slot1_x,slot1_y,114,16,4,item_1);}
if((menu_1 == 3 && item_1 == 3 && Active_slot==10) || (menu_1 == 5 && item_1 == 3 && Active_slot==10)){tft.writeRectNBPP(slot1_x,slot1_y,114,16,4,item_1);}
else if((tft.solid[i].spritecol == cabbot) && room == 4 && Active_slot == 1 && (ButtonB.fallingEdge()) && item_1 == 1) {tft.popup(F(" ""You got an item!"" "),20); item_1 = 3, S1=1, slot1_x, slot1_y, return true;}
else if((tft.solid[i].spritecol == cabbot) && room == 4 && Active_slot == 2 && (ButtonB.fallingEdge()) && item_1 == 1) {tft.popup(F(" ""You got an item!"" "),20); item_1 = 3, S2=1, slot2_x, slot2_y, ; return true;}
else if((tft.solid[i].spritecol == cabbot) && room == 4 && Active_slot == 3 && (ButtonB.fallingEdge()) && item_1 == 1) {tft.popup(F(" ""You got an item!"" "),20); item_1 = 3, S3=1, slot3_x, slot3_y, return true;}
else if((tft.solid[i].spritecol == cabbot) && room == 4 && Active_slot == 4 && (ButtonB.fallingEdge()) && item_1 == 1) {tft.popup(F(" ""You got an item!"" "),20); item_1 = 3, S4=1, slot4_x, slot4_y; return true;}
else if((tft.solid[i].spritecol == cabbot) && room == 4 && Active_slot == 5 && (ButtonB.fallingEdge()) && item_1 == 1) {tft.popup(F(" ""You got an item!"" "),20); item_1 = 3, S5=1, slot5_x, slot5_y; return true;}
else if((tft.solid[i].spritecol == cabbot) && room == 4 && Active_slot == 6 && (ButtonB.fallingEdge()) && item_1 == 1) {tft.popup(F(" ""You got an item!"" "),20); item_1 = 3, S6=1, slot6_x, slot6_y; return true;}
else if((tft.solid[i].spritecol == cabbot) && room == 4 && Active_slot == 7 && (ButtonB.fallingEdge()) && item_1 == 1) {tft.popup(F(" ""You got an item!"" "),20); item_1 = 3, S7=1, slot7_x, slot7_y; return true;}
else if((tft.solid[i].spritecol == cabbot) && room == 4 && Active_slot == 8 && (ButtonB.fallingEdge()) && item_1 == 1) {tft.popup(F(" ""You got an item!"" "),20); item_1 = 3, S8=1, slot8_x, slot8_y; return true;}
else if((tft.solid[i].spritecol == cabbot) && room == 4 && Active_slot == 9 && (ButtonB.fallingEdge()) && item_1 == 1) {tft.popup(F(" ""You got an item!"" "),20); item_1 = 3, S9=1, slot9_x, slot9_y; return true;}
else if((tft.solid[i].spritecol == cabbot) && room == 4 && Active_slot == 10 && (ButtonB.fallingEdge()) && item_1 == 1) {tft.popup(F(" ""You got an item!"" "),20); item_1 = 3, S10=1, slot10_x, slot10_y; return true;}
thank you buy the way I appreciate the help