Cycle through Inventory - HELP NEEDED!
Hi, I'm struggling with this and don't know where I'm going wrong.
Here's a simplified version (with less items):
I have an Inventory Display Actor which shows the image of the current active item.
I have a Cycle Button Actor which cycles through your collected items.
There are 3 items that can be collected:
Key1 (Integer attribute which is either 1=not collected, 2=collected and in inventory, 3=used and removed from inventory)
Key2 (same integer system used)
Key3 (same integer system used)
OK, so in my Inventory Display actor I have these rules:
If InvDisplay (integer) =0 > change image to NO ITEM IMAGE
If InvDisplay (integer) =1 > change image to KEY1 IMAGE
If InvDisplay (integer) =2 > change image to KEY2 IMAGE
If InvDisplay (integer) =3 > change image to KEY3 IMAGE
Then in my CycleButton I have these rules for each possible InvDisplay integer:
If Actor Receives Touch + InvDisplay=1
Change Attribute InvDisplay =2
If InvDisplay=1 + Key1=1
Change Attribute InvDisplay =2
If InvDisplay=1 + Key1=3
Change Attribute InvDisplay =2
The idea being that if you touch the cycle button and key2 hasn't yet been collected it'll cycle straight to key3 - which if collected will be displayed.
However, its just not working. I've tried numerous variations and I'm having no luck.
I realise I may be asking a biggie here - but hope someone has the kind heart to puzzle over it for me!
Thanks....
Here's a simplified version (with less items):
I have an Inventory Display Actor which shows the image of the current active item.
I have a Cycle Button Actor which cycles through your collected items.
There are 3 items that can be collected:
Key1 (Integer attribute which is either 1=not collected, 2=collected and in inventory, 3=used and removed from inventory)
Key2 (same integer system used)
Key3 (same integer system used)
OK, so in my Inventory Display actor I have these rules:
If InvDisplay (integer) =0 > change image to NO ITEM IMAGE
If InvDisplay (integer) =1 > change image to KEY1 IMAGE
If InvDisplay (integer) =2 > change image to KEY2 IMAGE
If InvDisplay (integer) =3 > change image to KEY3 IMAGE
Then in my CycleButton I have these rules for each possible InvDisplay integer:
If Actor Receives Touch + InvDisplay=1
Change Attribute InvDisplay =2
If InvDisplay=1 + Key1=1
Change Attribute InvDisplay =2
If InvDisplay=1 + Key1=3
Change Attribute InvDisplay =2
The idea being that if you touch the cycle button and key2 hasn't yet been collected it'll cycle straight to key3 - which if collected will be displayed.
However, its just not working. I've tried numerous variations and I'm having no luck.
I realise I may be asking a biggie here - but hope someone has the kind heart to puzzle over it for me!
Thanks....
Comments
The problem was I was using multiple 'if actor receive touch' rules within the Cycle Button Actor.