Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: eissen_eiram on Fri 04/05/2012 14:32:12

Title: INVENTORY: Way to highlight several inventory items at once
Post by: eissen_eiram on Fri 04/05/2012 14:32:12
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.

Title: Re: INVENTORY: Way to highlight several inventory items at once
Post by: geork on Tue 08/05/2012 08:52:49
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
iItem.Graphic = 1 //or whatever the number is for the highlighted graphic
Or if the user has clicked the item
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.