dianamod27
Member
- Reaction score
- 1
Is there a way of detecting when Chemical Rage ends, exactly?
Explanation:
I wanted the Tinker to have an ability called Minelayer which automatically spawns goblin land mines every few seconds depending on what level the ability is. Because of the hero spell limit, it's a unit spell that you buy from a shop: You buy a power-up-like item from a shop, it gives you a dummy ability (if you buy the power-up again it increases the dummy ability's level) and three triggers create land mines near Robo-Goblins that have that dummy ability.
The problem that occurred was that when he morphed, he lost the ability. I solved it by storing the ability's level and giving him it whenever he enters/exits Robo-Goblin form, or when he revives.
Now, the major problem is that I was going to have a similar setup for the Alchemist too, however I can't accurately detect when Chemical Rage ends.
Thanks in advance.
P.S.: Sorry if that was a bit convoluted, I'm really tired but need to fix this as soon as possible.
Edit: To be precise, I had a test trigger that would show me the level of the dummy spell the Alchemist had each second. Buying the spell works, so it showed "1" each second, even when I used Chemical Rage. However, when Chemical Rage ran out, it showed "0" again.
Edit 2: I guess I'll just always check whether the variable storing the level of the ability is equal to the actual level of the ability before the periodic triggers fire.
Explanation:
I wanted the Tinker to have an ability called Minelayer which automatically spawns goblin land mines every few seconds depending on what level the ability is. Because of the hero spell limit, it's a unit spell that you buy from a shop: You buy a power-up-like item from a shop, it gives you a dummy ability (if you buy the power-up again it increases the dummy ability's level) and three triggers create land mines near Robo-Goblins that have that dummy ability.
The problem that occurred was that when he morphed, he lost the ability. I solved it by storing the ability's level and giving him it whenever he enters/exits Robo-Goblin form, or when he revives.
Now, the major problem is that I was going to have a similar setup for the Alchemist too, however I can't accurately detect when Chemical Rage ends.
Thanks in advance.
P.S.: Sorry if that was a bit convoluted, I'm really tired but need to fix this as soon as possible.
Edit: To be precise, I had a test trigger that would show me the level of the dummy spell the Alchemist had each second. Buying the spell works, so it showed "1" each second, even when I used Chemical Rage. However, when Chemical Rage ran out, it showed "0" again.
Edit 2: I guess I'll just always check whether the variable storing the level of the ability is equal to the actual level of the ability before the periodic triggers fire.