| 02-05-2004, 12:02 PM | #1 |
Hello weaaddar, if you are watching in this thread. I recently implemented your item system into my map, ITS WAY TOO COOOOOOOOOOOOOOOOOLLLLL!!!! but i met into some problem, before your system, i actually added another item trigger made by Aiursrage2k that allows charged items to combine as one. This system actually conflict with your item system, as i put one charge item into the bagpack, then awhile later, i bought another and decided to put it into the bagpack too. after i open the bag, the item fused together as expected, but to my horror, the 'next page' and 'cancel' items got changed in position, and there is no way i can return them to original shape. To make matter worst, if i finish using the charged item, i will have no way to receive any items, or get back to the starting inventory. please help me, i know this may be absurd to do something extra for nothing, so i decided to give points to whoever that able to resolve this conflict, with workarounds or watever. PS: (I'm not very sure about the points system though, i not sure how many points i have and how to give them, pm me about it)emote_confused please, anyone. I drooling over this two great item systems. |
| 02-05-2004, 12:12 PM | #2 |
resolving this conflict would most likely require reprograming of somebody's code, I'm guessing there is no quick easy solution. |
| 02-05-2004, 12:46 PM | #3 |
For clarification's sake: It this to be interpreted as a call upon weaaddar to include the function of Aiursrage2k's system in his next revision? And that is to make items with charges stackable? I love that system of weaaddar's btw. My friend Peppar made a variant of it, mixed with a bunch of his old stuff, and it turned out damn sweet. The drag&drop idea was wonderful! :ggani: :D |
| 02-05-2004, 12:47 PM | #4 |
well, i know it requires reprogramming, thats why i wanna either of them to help me do it with their codes, and I'm more than willing to give them points too(well, if i have them). I'm certainly be glad if he can revise with the stacking of charged items. Do you think I shall post Aiursrage2k trigger in too? Aiursrage2k 's system is also very wonderful, and cannot be obmitted by those who has seen what it does. |
| 02-05-2004, 01:15 PM | #5 |
Easiest solution would do something unique to differeniate the items, for example all item you want to stack set the item health max to 100 health. It is a bit of a pain because you would have to manually change those item hitpoints. Code:
function GetWidgetMaxLife takes widget whichWidget returns real
local real a
local real b=GetWidgetLife(whichWidget)
call SetWidgetLife(whichWidget, 1000000.00)
set a=GetWidgetLife(whichWidget)
call SetWidgetLife(whichWidget, b)
return a
endfunction
function HasItemtype takes unit whichUnit, item this returns item
local integer i = 0
local item whichItem = null
local integer itemType = GetItemTypeId(this)
if whichUnit != null then
loop
exitwhen i > 6
set whichItem = UnitItemInSlot(whichUnit, i)
if GetItemTypeId(whichItem) == itemType and whichItem != this then
return whichItem
endif
set i = i + 1
endloop
endif
return null
endfunction
function StackItem takes unit whichHero, item whichItem returns nothing
local item stack = HasItemtype(whichHero,whichItem)
local integer itemCharges = GetItemCharges(stack)
if stack != null and stack != whichItem and itemCharges > 0 and GetWidgetMaxLife(whichItem) == 100 then
call SetItemCharges( stack, itemCharges+ GetItemCharges(whichItem))
call RemoveItem( whichItem)
endif
endfunction |
| 02-05-2004, 01:35 PM | #6 |
but, i thing differentiating the items will have no effect, the 'next page' and 'cancel' button will still be misplaced, and the inventory will be in a way disabled unwillingly. It will be better if the combination won't happens in the backpack whenever any heroes open it. |
| 02-05-2004, 06:47 PM | #7 |
Well if the next page and cancel are switched it shouldn't really matter. It only cares about the item in the slot, not the actual item itself. Although I'm not a 100% sure as I may have added something special to cancel. I was considering having items in the bag stack, but then I thought it would not be very good as then you can have stacks of like 99 potions which was never the intent of the original author of the map. |
| 02-06-2004, 05:52 AM | #8 |
The sad thing is, after the position of the items is changed, it does nothing when i clicked on it. Can you help me create an extra triggers that allows stacking in the bagpack but will only be activated in the bag. Tell me how to give points, i'll give it willingly. If the trigger is impossible or to time-consuming, then its ok to ignore this request. =P my friend had actually brainwash me about itemstacking. the itemstack also interfere with some of my item-based triggers. |
