inventory increase

Hey guys. Looking for some help please. I am making a story, and throughout the story people collect inventory such as food and drink. The problem I have is that on my Inventory screen, I really dont want the item to show on the list unless they actually acquired it through the store. example would be....

Gun or just Food
Food Water
water

I dont know how i would get the gun to not show on the list until it is actually acquired if that makes sense.

Need a rule like. If "gun acquired is true" than ....(show in inventory screen) otherwise (dont show). But i dont know how to make the list bigger or smaller based on inventory.

Thanks,
Kip

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    You'll want to store the inventory counts in a table, using one row for each item. So if you designate row 1 for "Food" then when you need to increase the number you would change table cell value Row: 1 Column: 1 to tableCellValue(tableName,1,1)+1.

    Your rule would be When numerical expression tableCellValue(tableName,1,1) > 0 ... [show in inventory screen]. You could accomplish this by spawning the "Food" actor or by changing its self.Color.Alpha value from 0 to 1.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • ashtmjashtmj Member, PRO Posts: 405

    It just so happens that I made just made a video for how to make a inventory with limited space :)
    hope this helps

  • kipdevkipdev Member Posts: 275

    Thank you guys. very helpful!

Sign In or Register to comment.