EZ Object Grabbing...How?

Started by blueshamoo, Mon 25/08/2008 15:47:45

Previous topic - Next topic

blueshamoo

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.

Buckethead

The sprite for the object could have a small part of the background in it. Atleast if I understand you correctly.

blueshamoo

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...


GarageGothic

#3
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.

SMF spam blocked by CleanTalk