HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Backpack

10-01-2004, 07:21 PM#1
image
I have been trying to add to this backpack system so that if you have a backpack you get so many spaces and if you have a backpack2 you have more spaces. I tried to do this by copying the normal trigger and the variables in the custom script and setting all of them to the same name but with a 2 on the end. I also set the new variables to the right item/ability codes. But it just gave me a load of compile errors. Is there something i am doing wrong. PLz tell me if it should work to do that and i will try again.thx
10-01-2004, 11:57 PM#2
weaaddar
Image, grab the latest version of drag and drop. You can set the size of each specific item. But they must all have the itemtype id. (i.e. I can make Bag 0001 have 4 slot and Bag 0002 8 slots, but I can't make Bag2 0001 have 44 slots).
10-02-2004, 07:10 AM#3
image
Thx you should post the new version on wc3sear.ch too as many people would appreciate it. You should also post your spellbook as a seperate map as many people have been looking for triggered spellbooks for ages.

Ps- what you mean but what do i have to do.
10-02-2004, 05:00 PM#4
weaaddar
As I was saying:::
There is one type of backpack recognized by my code. IT is stored under BagID(). Each bag has a member variable which store a length it can have. THe length must be a multiple of 4. You can do this something like this and my code will be fine:
Code:
local item bag1=CreateBag(CreateItem(BagID(),0,0),4)
local item bag2=CreateBag(CreateItem(BagID(),0,0),8)
This will create two bags with different storage sizes in the middle of the map. You can not do this though
Code:
local item bag1=CreateBag(CreateItem(BagID(),0,0),4)
local item bag2=CreateBag(CreateItem(Bag2Id(),0,0),24)
This will not work as my triggers will not react to Bag2Id()

I can not seperate the backpack and the spellbook. They are too complicated of systems. If I removed one I would break teh other and visa versa.

Drag And Drop 1.0 was not released as a beta but as a full release. D+D++ and D+D+=2 were both released as betas. They feature the much more difficult spellbook api. While D+D+=2 is very stable it is incomplete and I don't think it'd look good to release something like that.
10-02-2004, 07:38 PM#5
image
Quote:
Code:
local item bag1=CreateBag(CreateItem(BagID(),0,0),4)
local item bag2=CreateBag(CreateItem(Bag2Id(),0,0),24)
This will not work as my triggers will not react to Bag2Id()


Thx a lot but by the way i never did try to just put bag2id or whatever i basically made a copy of your system, on top of your system, but changed every single variable and item/ability code, in attempt to make it run a different backpack linear to the original.
10-02-2004, 10:08 PM#6
weaaddar
Then it would never have worked.
And that'd be horribly ineffecient. Unfortuantly the way the backpack triggering is done is through a procedural method. If I were to move it to an OOP method I could allow you to instantiate any item as a backpack, but at a cost. My code could not react to a bag not set as a bag. You would have to set every single bag as a bag to my code. I don't think its a cost I want to pay.