However, no matter how many items I put it only shows the last one , why??
Here is my codes
In objPlayer Create event:
item[10] = object0; // ==> object0 is the default "instead of null in other languages"
current_index = 0; // ==> used to check which index shall get the item
current_y_item = 32 //to order the inventory
for (i = 0; i <= 10; i+=1)
{
item[i] = object1; // ==> to make sure that all indexes have an object value
}
In objDragged Left Release event >> it's used to drag the items onto the inventory and it stays on the mouse
instance_create(500,objPlayer.current_y_item,objItem); objPlyaer.item[objPlyaer.current_index] = objItem; objPlyaer.current_index += 1; objPlayer.current_y_item += 33;
In objItem Destroy Event
objPlyaer.current_index -= 1; objPlayer.current_y_item -= 33;
in objShowInventoryButton Left Pressed Event
for (i=0;i<=10;i+=1)
{
with(objPlayer)
{
if (item[other.i] != object0)
{
instance_create(520,(33*i)+2,obj_item);
}
}
}
But in the debugging it shows instance_number(objItem) is 0 And it only creates one objItem at x=520 and y=2











