| 07-01-2008, 03:59 AM | #1 |
I'm not very good in JASS yet, but cooldown resetting when trading items on my map is intended. I'm trying to think of the most efficient way to do this, but my limited knowledge in JASS is probably holding me back from a great system that would be easy to implement. I was thinking of making timer arrays control a boolean to reset the cooldowns, so the cooldown on the original unit is still maintained. This would require a lot of work with the amount of items I'd have to consider. |
| 07-01-2008, 07:29 AM | #2 |
Well, what you could do is detect when an item is traded between players and (instead of just letting the trade occur) create a new item of the same type and give it to the receiving unit. Then, hide the original item (but not remove it) and somehow link it with the original unit using gamecache or something. When the item is traded again, repeat the process if the new receiving unit is different than the original unit. If the receiving unit is the original giving unit, then you hide the transferred item and give the receiving unit back the orignally hid item, etc.. It's a bit involved, but still doable. I guess covering when a player attacks an item and kills it would be a bit hard, but.... |
| 07-02-2008, 01:19 PM | #3 |
update your warcraft to 1.22 ^_^ |
| 07-02-2008, 10:30 PM | #4 |
That would do the opposite of what he wants. |
| 07-02-2008, 11:10 PM | #5 |
Pyro is on the right track. For each item, you'd need to create a copy of it whenever it was given to a unit that didn't have it before, give that copy to that unit and hide the one that was trade. However, in case the item (or any copy of it) is given to a unit which carried it before, get the copy that unit had and unhide it and give it back to that unit. |
| 07-05-2008, 08:15 PM | #6 |
Nice, I'll have to try this out, sounds easier than a timer array for sure :) |
