you will need a persistent object. create a new object and mark it as persistent.
we can call this object itemTracker.
now in the first level of your game, do a room code.
put this inside of it:
if not instance_exists(itemTracker)
{
instance_create(x,y,itemTracker)
}
this will create the itemTracker object when ur game starts, and will stay in the game forever until the game ends.
now inside the itemTracker object, make a create event, put this inside of it:
global.havepickedUpItemX = false; // this is a variable that we have set = to false;
and now in ur item that u want to disappear, when the player grabs it, run this code: global.havepickedUpItemX = true;
1 more step: in the same object u want to make disappear, make a room_start function and put this code inside:
if ( global.havepickedUpItemX == true )
{
instance_destroy()
}
let me know what happens