Array Problem

Get help using Construct 2

Post » Thu May 30, 2013 8:06 pm

I've been working on something for a while now and I'm just about done. I just have 1 more problem I can't seem to solve. When the player right clicks on an object, I am trying to make it change the value in an arrays element depending on the clicked objects instance variable.

This is how I am thinking it should work:



When the value is at 1, it's working perfectly fine. But if the value is over 1, it acts really weird. Sometimes it sets the x, y element to 0 and leaves the x element the same, sometimes it sets it to 1, 2, etc.

Heres the event for setting the value:



If anyone knows what is going on, help would be greatly appreciated.


EDIT: I had a big blonde moment. Not sure what I did yet, but it works.
EDIT EDIT: When changing the value, I put Arr_Inventory.At(Spr_Slot.slotNum - 1) - 1 instead of Arr_Inventory.At(Spr_Slot.slotNum - 1, 1) - 1 (forgot , 1 to get the second row instead of the top row.EncryptedCow2013-05-30 20:40:03
B
46
S
14
G
7
Posts: 603
Reputation: 8,106

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests