Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: joelphilippage on Thu 26/04/2007 13:33:04

Title: Inventory Outline
Post by: joelphilippage on Thu 26/04/2007 13:33:04
Ive been trying to figure this out, but is there a way to make a outline with a certain color appear around an inventory Item when it moves over a clickable object? Sort of like on CMI.
Title: Re: Inventory Outline
Post by: GarageGothic on Thu 26/04/2007 14:02:10
There IS a roundabout way to do this through RawDraw, DynamicSprites and pixel perfect detection, but it's not really worth it as it generally looks crap and will cause a slowdown when you generate the DynamicSprite. The easiest solution by far is drawing two versions of every inventory item (one with, one without outline) and swapping the two on mouseovers.

Edit: In regards to Ionias' post, just to make things clear, there's no reason to waste a view per item unless they are actually animated
Title: Re: Inventory Outline
Post by: Khris on Thu 26/04/2007 14:05:34
This was explained recently in this thread (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=30848.msg397833#msg397833).

Add a Custom property of type number, set its name to "Outline" and enter the sprite slot of the outlined sprite for every inventory item.
Then place the code from the linked thread into the rep_ex function.

The code is untested but should do the trick.
Title: Re: Inventory Outline
Post by: Ionias on Thu 26/04/2007 14:38:03
I have this in my game. It's also animated by changing the view property. This means you need a view for each individual inventory item.