Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: blueshamoo on Mon 25/08/2008 15:47:45

Title: EZ Object Grabbing...How?
Post by: blueshamoo on Mon 25/08/2008 15:47:45
Another question from me, sorry :)

a couple of my objects that the user adds to inventory are not very thick, and clicking the item to pick it up is rather hard for some of them.

I know how to change the crosshairs etc. for USING the item, but is there a way to set where they click to pick it up? or better yet.. to show where to click to pick it up?

Or... is there a way for example on a clothes hangar item, to have a 'hidden' object filling the space inside the hangar so when they click it, it picks up? Im not sure how to fill the space with clickable emptiness if that makes any sense.
Title: Re: EZ Object Grabbing...How?
Post by: Buckethead on Mon 25/08/2008 17:15:48
The sprite for the object could have a small part of the background in it. Atleast if I understand you correctly.
Title: Re: EZ Object Grabbing...How?
Post by: blueshamoo on Mon 25/08/2008 17:42:31
ok i get you... that would work for picking the item up.

is there a way to set the spot you need to click (IN inventory) to pick up each item? example:in inventory i cannot pick up a necklace by grabbing the charm but i have to grab the chain itself...

Title: Re: EZ Object Grabbing...How?
Post by: GarageGothic on Mon 25/08/2008 17:57:07
I believe that click detection for inventory items uses a simple rectangular check (the size of the rectangle is set using the InvWindow.ItemWidth and  InvWindow.ItemHeight properties). Most likely your inventory item graphic is too large, so the charm is actually outside that rectangle. Either change the ItemWidth/ItemHeight for your inventory window, or redraw the necklace sprite to fit within the current size.