HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Drag and Drop Component Edition: The newer Bag!

12-30-2004, 02:20 AM#1
weaaddar
It has been roughly a year since drag and drop started, and really I can say I never gave it a fair share of attention. This version plans to correct those flaws.
This version is ONLY the backpack and the attributer.

Or actually only the backpack or only the attributer. You can now delete the backpack from the map if you so chose, or the attributer. Hell you can delete both, but um I don't know what you expect it to do...
Drag and Drop is now a component system, as well as object oriented. That means that each component is basically self contained and can only work with the base systems and classes and its own code. I.e. the bag has no knowledge of any other component.

I also upgraded the bag, since I found RoN's to be fairly confusing to use. However, credit must be given where credit is due, it was his bag that largely inspired me to actually do the revisions. I added the functionality of his bag to what I felt was the much more user friendly interface of my bag.

The bag now stores items by handle, that means that you can store bags in bags. Also, there can be multiple bag types though the demo map only has one defined. There are changes inside the bag too. Moving items in the bag no longer causes it to move them back to thier original location, and all changes are saved. You can also now drag items into bags inside bags. But you can't open bags inside of bags.

More over, you can actually move while doing stuff with the bag, only errors will cause your guy to stop. I don't use buggy functions like UnitDropItemSlot which remove your unit's order queue.

How do I use it?
--Just fire up the test map and play around its easy as hell to use. Pick up a backpack and drag items into it open the backpack and drag onto cancel to pull them out.
Okay Jackass, I meant I want to put it into my map?
--Copy all the code in the header section, then copy the triggers. Make sure to copy them in the order they appear. (from top to bottom). Create a gamecache variable called obj in your map. Save your map and close the worldeditor you will probably get an error but it will save anyway. Now go and copy the items in my map over to yours. And then modify them to the one's found in the header section.

For the sake of making this as friendly as possible: I've released two versions of this demo:

-Developer (bag4d):
--If you feel you are compotent coder and would like a better understanding of how the Drag and Drop project works, this is for you. Features lots of comments, classes are seperated and categoried, as well as triggers.
-Consumer (bag4):
--Not very good with jass? Don't care at all how it works? This is the version for you. There are just a few triggers here, and if you don't want a component just delete and its test functions.
01-01-2005, 10:11 AM#2
logik
ah, finally you realeased your backpack upgrade... i was wondering when you were going to release one that takes full advantage of patch 1.17 (as the other were made before 1.17, and you hypothesised that you could bring alot with its new functions)

goodjob, i am going to test it now.

also... you should update your sig to advertise bag4 and not bag3
01-01-2005, 04:01 PM#3
weaaddar
Actually this doesn't take advantage of 1.17 at all. The spellbook would if I bothered upgrading but I didn't. (The spellbook was on a complexity level greater then DT4a and quite frankly thats too much).
01-02-2005, 12:06 PM#4
logik
yes i agree, i believe the payout would be less then the input... thus ineffient (thats just in my opinion)
01-02-2005, 10:58 PM#5
weaaddar
will no one comment on this?
03-25-2005, 01:44 AM#6
DragonZombie
Great work.