Schwee
Member
Been at this long enough so I'm reaching out. I'm sure its stupid and obvious...
Creating inventory slots:
Checking if slot is selected via mouse click:
I've pretty much narrowed down the error down to the position_meeting check. GM documentation says position_meeting SHOULD accept this 'slot' but it does not seem to register. I have tried slot.id as well. Is there something else I am missing?
Creating inventory slots:
Code:
for(var i=0; i<obj_ctrl.inventory_size; i++;) {
slots[i] = instance_create_layer(curr_x, curr_y, "Inventory_slots", obj_inv_slot);
Code:
for(var i=0; i < array_length_1d(slots); i++) {
var slot = slots[i];
if (
mouse_check_button_pressed(mb_left) &&
position_meeting(mouse_x, mouse_y, slot)
) {