- Joined
- Jul 31, 2020
- Messages
- 103
Misleading title, and hi.
I can't think of a short title that actually communicates my question properly.
So, the situation: 4 different spell books. These are the abilities, or rather the arrays of abilities if we're trying hard to be technically correct. They contain the stuff I want, and they should be active during different times, under different circumstances.
The issue: Although I can disable/enable, hide/unhide ability icons, this will not push their button around on the unit. This obviously leads to the problem where 3 of the 4 spell books will never show up since they don't have space.
What I tried: A couple different ways.
Anyway, is there anything very simple that escapes me during these late hours?
I can't think of a short title that actually communicates my question properly.
So, the situation: 4 different spell books. These are the abilities, or rather the arrays of abilities if we're trying hard to be technically correct. They contain the stuff I want, and they should be active during different times, under different circumstances.
The issue: Although I can disable/enable, hide/unhide ability icons, this will not push their button around on the unit. This obviously leads to the problem where 3 of the 4 spell books will never show up since they don't have space.
What I tried: A couple different ways.
- First I thought maybe if I use one big spell book (I was lucky to be able to fit everything into one from all 4), I would be able to just hide/unhide specific abilities, and call it a day. No, they retain their button position (from what I saw, consistent with the list in the object editor). I don't want, for example, the first 3 slots to be empty, and then have a few buttons starting from after there.
- I went on to creating 4 spell books instead, and adding only the sets of abilities I want. I tried just hiding/unhiding, hoping it would all fall into place. No, they would just never show up past the initial one, since the rest don't have space. They should occupy the same slot, but they obviously cannot do that, even if hidden.
- Disabling and hiding, same as the previous situation. Nothing changes.
- Trying to force out the position change by setting the X and Y. Doesn't work, the slot is technically occupied, so this just fails to do anything.
- Scripting a bit to move every momentarily unused spell book icon to (0, -11) although I don't know any fresh information on whether this still crashes the game on Mac or not. Still no, nothing changes. I'm unsure whether this even works if one attempts to call BlzSetAbilityPosX/Y(), and do this dynamically during runtime. Anyway, didn't work.
- Remove the 4 spell book abilities from the hero, and add them back immediately with the one I'm going to be using added first. This means the slot is guaranteed to be empty, and the one I need enabled will be going there. The other 3 get disabled. (Side note here, you might be wondering why do I not just remove the ones I'm not using. Long story short, I need every ability to actively be on the hero. I just don't want to have access to all of them at the same time. It's a requirement, so to speak.)
Anyway, is there anything very simple that escapes me during these late hours?