| 09-27-2010, 01:34 AM | #1 |
Hello! I use 4 Spellbook Items for different Menus on a unit at the moment. This works kinda fine, but with one problem: When i open one spellbook, then open another (Items => i can open a spellbook, when another one is still open), i have to close every spellbook one by one. So i go to Spellbook menu1, cant find the option i want, klick spellbook menu2, with spellbook 1 stil open. I find the right ability, use it and then have to close the second and then the first spellbook. That kinda sux. I tried the autoclose thing, when the unit runs out of mana and every spell inside the spellbook needs mana, but that still just closes one book and not all open books. If i could get the "cancel button klicked" event (which dont exist), i could force the player to press the S Key (ForceUiKey) multiple times (i can get the spellbook opened event, because its an item, that would gimme the chance to get the number of opened spellbooks => the amount of "S" klicks needed) Well, perhaps someone knows a workaround or has an idea of solving this problem. thanks in advance! |
| 09-27-2010, 02:44 PM | #2 |
Items have field "Stats - Cooldown Group". Make sure both items have the same cooldown group set, then make your spellbook abilities. Check "Shared spell cooldown" in spellbook abilities, give the spellbook a cooldown of let's say 1 second. Also remember that every spell in the spellbook has to have a cooldown (doesn't matter if it's 0.25 or 1 second, just must be higher than 0). In the test map you might notice that the trick isn't working if you use Roar ability (it has no cooldown set), but it will be all fine if you use Slam from another spellbook (which actually has cooldown). I hope testmap explains everything. |
| 09-27-2010, 06:02 PM | #3 |
Thanks for your contribution! Unfortunately that wont solve my problem. Try pick up both items in your testmap, klick item 1, then item 2. Now you use that slam => slam spellbook closes but the roar spellbook is still open. So this will again just close one Book, not every book. Try to stack mass spellbooks, by klicking 1-2-1-2-1-2-1-2-1 and so on. You have to close every book manually. €dit: But your solution solves one little problem: You cant stack the same spellbook ability. Multiple klicking the spellbook just opens it one time. Still that klick spellbook 1 then spellbook 2 issue exists. |
| 09-27-2010, 07:05 PM | #4 |
How about trying to remove unit from selection then adding it again? I think that might solve the problem. |
| 09-27-2010, 07:55 PM | #5 |
That would mean i have to know when a spellbook is closed. Thats not really possible. Beside this, it looks like this selection stuff only works when its actually done by a "human" :) Deselect and select the unit again with triggers wont close any spellbook. Oh god, .. blizzard hates me. |
| 09-27-2010, 07:56 PM | #6 |
It will close I think, you just have to detect when item is used, then remove from selection and add in the same moment, I'll test it now and tell you the results. Edit: You were correct, it won't work. I've got no further ideas. |
| 09-27-2010, 08:07 PM | #7 |
Well you cant even detect item-uses when they got the spellbook ability. But thanks for your efforts Won-Qu! Not even killing the hero, instantly reviving it and selecting it again via trigger closes the nasty spellbook :O |
| 10-29-2010, 05:53 PM | #8 |
I notice when you remove abilities from a spellbook it closes it. It didn't work with multiple levels like you have, but you could make a trigger do it to each spellbook so that it closes them all. Add a dummy ability (I don't think it can be passive) to each spellbook then remove it. |
