• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Animation- set unit size to 101%

Status
Not open for further replies.
Level 4
Joined
Dec 25, 2012
Messages
66
For some reason, when given 101% value action "Animation- set unit size" increases the scale of target unit by WAY more than 1%, more likely by 10+. Is it the expected effect (min. step size) of this function, or am I doing something wrong?

P.S: The unit I'm trying to slightly enlarge is standard non-custom Clay Golem. The action is not inside a loop.

Screenshot: http://h64i.imgup.net/golem4b7a.png
 
Last edited:
Level 4
Joined
Dec 25, 2012
Messages
66
Just tried setting 1.01 in trigger editor. This made a unit so small it was hard to see it XD. Looks like it is a percentage value after all. Though it doesn't explain why 101% increases the size so much.

Animation - Change unit size - Change (Last created unit)'s size to (101%,101%,101%) of original.
 
Last edited:
Level 4
Joined
Dec 25, 2012
Messages
66
I think i got it. Clay golem uses the Rock golem's model with scaling already set to 0.6 in the object editor. Trigger, however, takes the ORIGINAL scale of that model (i.e. 1), and applies 1% increase to it. I guess to enlarge 0.6 scaled model by 1%, I should write Change (Last created unit)'s size to (66%,66%,66%).
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
I think i got it. Clay golem uses the Rock golem's model with scaling already set to 0.6 in the object editor. Trigger, however, takes the ORIGINAL scale of that model (i.e. 1), and applies 1% increase to it. I guess to enlarge 0.6 scaled model by 1%, I should write Change (Last created unit)'s size to (66%,66%,66%).
Ensure the default size is 1 (100%).
that wasnt that hard.
 
Level 4
Joined
Sep 13, 2014
Messages
106
You guys are silly @The_Silent @IcemanBo @Wietlol. He wasn't talking about changing scaling with the object editor - he was talking about changing scaling with the trigger editor. As in, this trigger:

  • Animation - Change No unit's size to (100.00%, 100.00%, 100.00%) of its original size
That trigger does use percentages.

The problem is, that isn't based on the object editor scaling, but on a initial scaling factor of 1.

Honestly, though, that was my first thought too.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657

Ok, calling IcemanBo or The_Silent silly, I am fine with that.
But on me, you have crossed the line!

We all (at least IcemanBo and I) knew from the start that he was talking about the trigger action, but that action sets the scaling to xs, ys, zs that is given as parameters. The difference between the value it was before and the new value had a large difference, which means that the previous value was not the expected initial value.

One of the 2 causes for this is that it was set by another trigger before. That cause was probably not the case.
The other is that the initial value is not 1.0, but 0.6 in this case. That value comes from the Object Editor.
That is what we were talking about.

So now that you know we already knew what the problem was and told him to ensure the problem's cause was not the object editor, how about you being silly?

Next to which... "Object Editor scaling" doesnt exist. It never has and never will.
What happens is when a unit is created, the unit is scaled based on those values.
This all happens inside the CreateUnit() native where it calls the function that the SetUnitScale() native points to.
So what actually happens is this:
call SetUnitScale(bj_lastCreatedUnit, 0.6, 0.6, 0.6)
call SetUnitScale(GetTriggerUnit(), 1.1, 1.1, 1.1)

How is it that every time someone calls me silly, they become the silly ones?
 
Level 4
Joined
Sep 13, 2014
Messages
106
Ahh. That wall of text wasn't very clear from the one sentence answers. So I guess that by "Ensure the default size is 1 (100%)." it is meant to apply to the value in the object editor, and not the default scaling value of the trigger action.
 
Status
Not open for further replies.
Top