- Joined
- Jul 30, 2018
- Messages
- 445
Is there a way increase a variable's array size in a trigger?
I have to save each cast ability (or it's targets and whatelse) to variable every time the ability is cast. So is there a way to increase array size on the go, because I can't know how many times the ability is cast during the game and it feels a bit stupid to put the array size to like 99 just for sure.
It can't take up much memory to have excess, empty arrays, but it still just feels a little clumsy.
Here's an example of one my ability triggers:

I have to save each cast ability (or it's targets and whatelse) to variable every time the ability is cast. So is there a way to increase array size on the go, because I can't know how many times the ability is cast during the game and it feels a bit stupid to put the array size to like 99 just for sure.
It can't take up much memory to have excess, empty arrays, but it still just feels a little clumsy.
Here's an example of one my ability triggers:
-
ab Polymorph
-

Events
-


Unit - A unit Begins casting an ability
-
-

Conditions
-


(Ability being cast) Equal to Polymorph
-
-

Actions
-


Set PolymorphDur[PolymorphCount] = 0
-


Set PolymorphTarget[PolymorphCount] = (Target unit of ability being cast)
-


Wait 1.00 seconds
-


[Increase array size here?]
-


Set PolymorphCount = (PolymorphCount + 1)
-
-



