Okay that worked a lot better than I expected! While messing with inventory system I realized that ItemPickup(global.items[0,0]);
that I used to pick up the items, could be similarly replicated to remove simply by reversing the script it was calling. Now my obj_chest
carries a different function compared to items that you pick up.
opened = false;
if(global.KEYS >= 1 && opened = false) {
ItemRemove(global.items[0,0]);
global.KEYS -= 1;
image_index = 1;
opened = true;
}
else {
//show_debug_message("already opened");
}
Guess that means tomorrow I'll start working on the locked doors and finally start the dungeons! Surfaces and state machines are going to have to wait.
No comments:
Post a Comment