Drag&Drop Inventory

For questions about using Classic.

Post » Sun Jun 12, 2011 7:02 pm

In this example, I have implemented inventory system.
But I failed to realize: :(
"to drag things on each other was not possible"

Please help me to realize this system^^^

This is cap file:
B
5
S
2
G
5
Posts: 97
Reputation: 2,826

Post » Sun Jun 12, 2011 9:38 pm

There's some good inventory tutorials/examples somewhere on here.

Do a search for "inventory" and you should find something useful.
Maybe one of the authors will post here too.

Krush.
B
2
S
2
G
3
Posts: 406
Reputation: 2,062

Post » Sun Jun 12, 2011 10:47 pm

I made a basic example for such an inventory a while ago: [url:2kgj8y36]http://dl.getdropbox.com/u/2306601/inventory_007x3.cap[/url:2kgj8y36]

A bit outdated, but still does the job. Coincidentally I just wrote a little bit about this on the We Construct blog.

There are also several inventory examples listed in this post: [url:2kgj8y36]http://www.scirra.com/forum/viewtopic.php?f=3&t=8122&p=62428#p62404[/url:2kgj8y36]
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Mon Jun 13, 2011 7:50 am

Thank you for your examples, but I've seen them all. But I need a simple example of inventory with the ability to haul things(drag&drop). Maybe someone can help?
B
5
S
2
G
5
Posts: 97
Reputation: 2,826

Post » Mon Jun 13, 2011 11:27 am

Thanks, but I myself fixed my example.

Now this is a very simple example of inventory.
B
5
S
2
G
5
Posts: 97
Reputation: 2,826

Post » Mon Jun 13, 2011 12:00 pm

[quote="Vicu":3cob4z0m]Thank you for your examples, but I've seen them all. But I need a simple example of inventory with the ability to haul things(drag&drop). Maybe someone can help?[/quote:3cob4z0m]

Most of these examples are pretty basic. And one in particular does exactly what you ask for.

[quote="Vicu":3cob4z0m]Thanks, but I myself fixed my example.

Now this is a very simple example of inventory.
[/quote:3cob4z0m]

That one doesn't seem to work very well either, I can still drag one object onto another. :?
You really should look into the array object to improve the functionality of your inventory. The examples have been given. :wink:
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Mon Jun 13, 2011 12:07 pm

[quote:1lgjfcbb][quote="Vicu":1lgjfcbb]Thanks, but I myself fixed my example.

Now this is a very simple example of inventory.
[/quote:1lgjfcbb]

That one doesn't seem to work very well either, I can still drag one object onto another. :?
You really should look into the array object to improve the functionality of your inventory. The examples have been given. :wink:[/quote:1lgjfcbb]
Here's the new fix:
B
5
S
2
G
5
Posts: 97
Reputation: 2,826

Post » Mon Jun 13, 2011 11:47 pm

Your example looks pretty, but it is not functional. You aren't actually storing your items anywhere, just placing them on the screen. Plus, you can still drop items on top of each other (drag your mouse off the screen while moving an object and then bring it back.....).

Check out PixelRebirth's examples.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest