Drag and Drop Inventory Possible?
I just stumbled upon the Newsground TGF2 Edition and was wondering if it is possible to create a drag and drop inventory with the limited objects of this version?
The type of inventory I am looking to achieve is the one usually used in Escape the Room flash games. Basically find the item click on it and drag it to the inventory, then when you need the item just click on it (when in inventory) and drag it to a object/item to interact with.
Thank You
InsertCoin25
Re: Drag and Drop Inventory Possible?
Yes, the general idea is to set some sort of value on the object when it's clicked on, to tell it to follow the mouse, and then to clear that value when the mouse is released over the inventory.
Examples in this thread might help:
http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=190172
Re: Drag and Drop Inventory Possible?
There's also one on nivram's site that should definitely be openable with the TGF2 Newgrounds version: http://www.castles-of-britain.com/mmf2examplespage3.htm (at the bottom of the page).
Re: Drag and Drop Inventory Possible?
Thanks for the examples guys :grin: I tried both examples and they run great on the Newgrounds Edition. Just have another question: After the item is clicked on and dragged how would I have the item return to the place it was picked up at if it isn't dropped in the inventory? Basically return to the location it was at if it doesn't interact with the inventory or another item.
Thanks Again
InsertCoin25
Re: Drag and Drop Inventory Possible?
Save the X, Y position in Global Values. When it is dropped place it at the Global Value's X, Y position.
Marv