• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] Problem With multiple Spellbook Items on one Unit

Status
Not open for further replies.
Level 2
Joined
Jan 21, 2008
Messages
16
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!
 
Level 2
Joined
Jan 21, 2008
Messages
16
Do your spellbooks have the same ability order?
Yes. I tried to change the orders to different ones for all 4 but that changed nothing.
Cancel order:
  • Custom script: call IssueImmediateOrderById( *unit*, 0xD0008 )
This wont work for spellbooks as it seems, basically does nothing.
First, your spellbooks need to have different baseIDs for them to work separately...
The "skips cinematic" will only work for escape cancels, which isnt enough for me.
Well, with the same baseID for all 4 item spellbooks and different IDs for every ability inside these books its kinda working fine. But that "all books stay open when you open another one" issue still exists.
 
Level 2
Joined
Jan 21, 2008
Messages
16
Strange thing is that these item-books even are able to be open multiple times.
You klick spellbook item1 - 2 - 3 - 4 - 1 again 2 - 3 - 4 and then you have to click cancel 8(!!) times to close all books. Funny stuff.
 
Status
Not open for further replies.
Top