The Daily Click ::. Forums ::. Klik Coding Help ::. Inventory Drop n Drag (download included)
 

Post Reply  Post Oekaki 
 

Posted By Message

Jason Orme

Using Klik Products Since 1998

Registered
  24/05/2002
Points
  960

VIP Member360 OwnerWii OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimeI'm a Storm TrooperI'm on a BoatIt's-a me, Mario!
Sonic SpeedMushroomStrawberryI like Aliens!PS3 OwnerTurtle Power!I am an April Fool
7th December, 2008 at 03:57:04 -

I'm working on an inventory system that uses s-m-r's click n drag system.

Basically I need to be able to move items from the inventory to "drop them", but also move items back into the inventory (in a snap-to grid kind of way). I'm also having problems having items appear in the inventory in order.

Check out this file to see how i've gone about it so far.

http://www.jsofts.com/inventorysystem.mfa

 
www.jsofts.com

Jon Lambert

Administrator
Vaporware Master

Registered
  19/12/2004
Points
  8235

VIP MemberWii OwnerTDC Chat Super UserI am an April FoolSSBB 3265-4741-0937ACCF 3051-1173-8012360 Owner
7th December, 2008 at 04:03:14 -

I haven't looked at it yet, but what happened to your platform RPG?

 
Sandwich Time!Whoo!

JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
7th December, 2008 at 04:09:58 -

Works pretty well, it's strange I was experimenting with drag and stuff. I managed to make an engine that let you pick it up by clicking it and clicking to let go of it in only 2 events. But I guess that didn't really count as drag and drop though...

 
n/a

-J-



Registered
  05/10/2008
Points
  228

VIP MemberThe Cake is a Lie
7th December, 2008 at 04:19:32 -

I made an example of how to store things in an inventory that would place them in the right order... but I'm afraid it's disappeared into the void of cyberspace.

I think I was using the easy grid object, and had two counters to store X and Y values of something :S

Like:

-User clicks on "Group.InventoryItems"
>Set X position of "Group.InventoryItems" to XofCell("EasyGrid", value"Counter X")
>Add 1 to Counter X


So when you click the first object, it positions itself to the first cell, then adds 1 to the Counter X, so that when you click the next item it will position itself to the second cell.

I think I managed to add Y dimensions to that as well, and it wasn't much different. I hope this helps!

 
n/a ...

Jason Orme

Using Klik Products Since 1998

Registered
  24/05/2002
Points
  960

VIP Member360 OwnerWii OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimeI'm a Storm TrooperI'm on a BoatIt's-a me, Mario!
Sonic SpeedMushroomStrawberryI like Aliens!PS3 OwnerTurtle Power!I am an April Fool
7th December, 2008 at 04:23:16 -


Originally Posted by Jon Lambert
I haven't looked at it yet, but what happened to your platform RPG?



I've stopped it for now, everything people are contributed have been kept.
Mainly it was due to lack of interest.

I'm now mostly working on different things, learning new techniques to improve my game making.

 
www.jsofts.com

Jason Orme

Using Klik Products Since 1998

Registered
  24/05/2002
Points
  960

VIP Member360 OwnerWii OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimeI'm a Storm TrooperI'm on a BoatIt's-a me, Mario!
Sonic SpeedMushroomStrawberryI like Aliens!PS3 OwnerTurtle Power!I am an April Fool
7th December, 2008 at 04:32:10 -


Originally Posted by -Julian-
I made an example of how to store things in an inventory that would place them in the right order... but I'm afraid it's disappeared into the void of cyberspace.

I think I was using the easy grid object, and had two counters to store X and Y values of something :S

Like:

-User clicks on "Group.InventoryItems"
>Set X position of "Group.InventoryItems" to XofCell("EasyGrid", value"Counter X")
>Add 1 to Counter X


So when you click the first object, it positions itself to the first cell, then adds 1 to the Counter X, so that when you click the next item it will position itself to the second cell.

I think I managed to add Y dimensions to that as well, and it wasn't much different. I hope this helps!



I can see that working, but I can also see problems when removing items from the inventory.

Edit: Nope, my knowledge of easy grid object is poor and I can't figure out how to work it.

Edited by Jason Orme

 
www.jsofts.com
   

Post Reply



 



Advertisement

Worth A Click