- Joined
- Oct 12, 2016
- Messages
- 769
So, here's my problem:
I am using the Night Elf archer, hippogryph, and hippogryph rider units with "Mount Hippogryph."
All of these units have abilities that "level up" in a form of unit ranking system:
- There is an integer stored in a hashtable that counts the number of attacks each unit makes on any enemy, let's call it "RankInt".
- Each unit has an ability that levels up at different thresholds for RankInt, up to 6 levels.
Now, the rank abilities are not the problem. My issue: when archers mount hippogryphs, they lose all rank progress since it removes the mounting units.
I have tried a trigger that fires when a unit uses "mount hippogryph" or "pick up archer." This stores RankInt as a global variable, then assigns RankInt to a hippogryph rider's "rank" in a separate trigger when it enters the map. I did this for when the rider uses "dismount" too.
The problem is, this causes only one of the units to have a rank when the other has nothing, and I do not want just any hippogryph or archer to gain the rank. It is OK if, when it dismounts, both created units get the same rank.
Is there a better way to detect both a specific archer and hippogryph that enters the map after a hippogryph rider uses dismount?
I am using the Night Elf archer, hippogryph, and hippogryph rider units with "Mount Hippogryph."
All of these units have abilities that "level up" in a form of unit ranking system:
- There is an integer stored in a hashtable that counts the number of attacks each unit makes on any enemy, let's call it "RankInt".
- Each unit has an ability that levels up at different thresholds for RankInt, up to 6 levels.
Now, the rank abilities are not the problem. My issue: when archers mount hippogryphs, they lose all rank progress since it removes the mounting units.
I have tried a trigger that fires when a unit uses "mount hippogryph" or "pick up archer." This stores RankInt as a global variable, then assigns RankInt to a hippogryph rider's "rank" in a separate trigger when it enters the map. I did this for when the rider uses "dismount" too.
The problem is, this causes only one of the units to have a rank when the other has nothing, and I do not want just any hippogryph or archer to gain the rank. It is OK if, when it dismounts, both created units get the same rank.
Is there a better way to detect both a specific archer and hippogryph that enters the map after a hippogryph rider uses dismount?
Last edited: