Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
myid = string(object_get_name(object_index)) + string(x) + string(y);
picked = 0;
var file = 'picked.ini';
if file_exists(file)
{
ini_open(file)
picked = ini_read_real('items',myid,0);
ini_close();
}
if picked = 1
{instance_destroy();}
In the code where you pick up the item:
GML:
var file 'picked.ini';
if file_exists(file)
{
ini_open(file)
ini_write_real('picked',myid,picked);
ini_close();
}
I didnt try the code myself tho' so hope it works! if it doesnt work, try moving everything in the create event that is written below the picked = 0; to an alarm.
If the room is persistent (with the persistent checkbox checked in the room editor), then destroying the instance by any method (typically instance_destroy()) will lead to the instance remaining destroyed when the room is entered once more.