I think the size action sets the models absolute scaling and not its relative scaling. As such if a hero is set to a scale of 200% in the object editor they will shrink on the first level up down to 110%.
Yeah, you're correct.
Luckily, with the recent patches (I think 1.31+) there's now the option to adjust a unit's Scaling Value directly, which resolves this issue.
For anyone that's interested here's how you can do it:
Variables: Scale_Base = Real (Array), Scale_Current = Real (Array), Scale_Percentage = Real
Requires a Unit Indexer (link in my signature)
How it works:
When a unit enters the map we immediately save it's Scaling Value (This is the value listed in the Object Editor -> Paladin has a 1.20 scaling value for example) in the variable
Scale_Base. This way we will always have access to that unit's base Scaling Value at any given time. Then we set
Scale_Current to be equal to
Scale_Base, this is the value that we increase/decrease whenever we want to re-size our unit. Note that you'll have to do this process differently for pre-placed units since they won't "Enter the map", Pick every unit in playable map area works.
How the math works for scaling: 0.01 represents 1%, so increasing
Scale_Current by
0.10 actually increases the unit's size by
10%. The Paladin has a base Scaling Value of 1.20, meaning he's actually 20% larger than his model's default size. If you increase 1.20 by 0.10 you get 1.30, which makes the Paladin 30% larger than his default size.
You'll see that I multiply
Scale_Current by 100.00, this is because
Animation - Change Unit Size works with %, so if we plug in 1.30 the unit would actually shrink down to 1.30%. The solution, multiply the Scaling Value by 100.00 and use that value as the % instead.
1.30*100.00 = 130.00, meaning our unit's size would be set to 130%.
@Whitewolf8
There's no leaks in your trigger.
The common leaks occur when creating
Points (Position of triggering unit, Target point of ability being cast, etc...), when creating
Unit Groups (Pick every unit), and
Player Groups (Pick every player). An exception for Player Groups is "Pick every player in
All Players" as it doesn't leak.
Special Effects leak too, so make sure to use "Destroy last created special effect" when using them. Setting the special effect as a variable and then destroying it at a later time works as well. This is true for the other types of leaks as well.
So the main culprits will be
Points,
Groups, and
Special Effects. If you don't see the words "
Position", "
Point", "
Pick every unit/player", in your triggers then you're probably safe from leaks.
Note that when cleaning up these leaks with Custom script, you'll see the terminology change.
Points are considered
Locations (call RemoveLocation) and
Player Groups are considered
Forces (call DestroyForce).