INVENTORY: Way to highlight several inventory items at once

Started by eissen_eiram, Fri 04/05/2012 14:32:12

Previous topic - Next topic

eissen_eiram

Good Day!

Me and my group mates are actually having this project in school and we like several inventory items to be highlighted or selected at once. Can AGS support that feature? If yes, how? If it's not supported, then is there a possible way to make it happen?

Your help is greatly appreciated.

Thank you so much.


geork

Hello

It is possible to highlight several inventory items at once but it will require some scripting. You can do it by having a "normal" graphic and a "highlighted" graphic for each item. The next step depends on if you stack the same type of inventory items:

If so: just change the graphic for that item
Code: ags
 iItem.Graphic = 1 //or whatever the number is for the highlighted graphic

Or if the user has clicked the item
Code: ags
 player.ActiveInventory.Graphic = 1 //Or whatever the number is for the highlighted graphic


If not: I'm not sure if it's possible to change the graphic of an item by index type...maybe one of the wiser members can help you out here. For most games though the above code should do fine.

SMF spam blocked by CleanTalk