Custom Inventory

Started by Vincent, Fri 24/06/2016 00:31:40

Previous topic - Next topic

Vincent

Good Evening to all AGSer :)

I'm trying to write something approximately simple but I'm having some difficulty.
I hope someone can help me out in the free time.

I love how AGS handle the selected inventory graphic for the mouse cursor anytime you click on a item.
I have an InventoryWindow with some little boxes where is placed the items that you collect.

This is what I'd like to do :

A) Anytime you click the item, the cursor graphic change to the current item graphic that you select.
B) After you select that item the box will look empty
C) If you click on the empty box the item return to the box and the mouse cursor change to the default one

Do you know what is the best way to do that ?

Thank you very much in advance :)

Mandle

#1
I would say just make a dummy blank sprite and change the inventory item's image to that sprite whenever it is selected, and then change it back when it's clicked on again (and the player currently "HasInventory" or whatever that command is...if you need the extra check)

Vincent

Thank you a lot Mandle :)
I figure out what you said in the message and it is just working good :)
Also, the 'HasInventory' command did the trick as well, thanks again for the support :)

Mandle

Glad to hear my muddled late-night ramblings actually made some kind of sense! :)

Cassiebsg

And this is how you know that you're no longer a novice when coding with AGS... That awesome moment when you realize you have the answer to a question. ;)
There are those who believe that life here began out there...

Mandle

Quote from: Cassiebsg on Sat 25/06/2016 23:38:46
And this is how you know that you're no longer a novice when coding with AGS... That awesome moment when you realize you have the answer to a question. ;)

And then Khris pops in and says "Or why not just do this...It is after all what it was designed to do..."

(Just kidding Khris: You're awesome! Never leave us!)

SMF spam blocked by CleanTalk