| 07-31-2008, 06:41 PM | #1 |
Hi as some of you know, I am making a bag system called CBS for a campaign. However, I have a real problem, There is no way of storing items into cache and then having them back in the next chapter !!! Is there a way for me to store all items of an "Item Array" into the cache and then restore them to the game in the next level of a campaign ?? Toadcop how did you do it man! =P Plz if you help you all get +rep !! |
| 07-31-2008, 07:18 PM | #2 |
Yes there is. Store the ID and the charges for each inventory slot, or whatever the hell you want. |
| 07-31-2008, 08:00 PM | #3 | |
Quote:
|
| 07-31-2008, 08:06 PM | #4 |
It doesn't matter. If it has 0 charges, then it will get 0 charges. If it has 999, it will get 999. |
| 07-31-2008, 08:28 PM | #5 |
If I store the ID, it will be like Creating a new Item, and I will lost the charges of the items ... is there a better way ? |
| 07-31-2008, 09:56 PM | #6 |
Dude, lol he just said STORE the charges so you can reset them on load. |
| 07-31-2008, 10:01 PM | #7 | |
Quote:
That Way I will need two variables =S |
| 07-31-2008, 10:08 PM | #8 | |
Quote:
You don't need to. |
| 07-31-2008, 10:12 PM | #9 | ||
Quote:
So: Setting charges for a non-chargeable item will do nothing. The item will be like before (non-charged). You can simply treat all items as if they were charged. So... Quote:
... because it doesn't matter. |
| 07-31-2008, 11:48 PM | #10 | |
Quote:
JASS:native GetItemCharges takes item whichItem returns integer native SetItemCharges takes item whichItem, integer charges returns nothing |
| 08-01-2008, 08:10 AM | #11 |
in my case i simply save cache to harddrive and thats it =) and you have unique ID for anything between any map... it's like own scope for campaign. |
| 08-01-2008, 08:29 AM | #12 | |
Quote:
Ok guys, thx for clearing my mind up, I will soon post something =D |
