HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

SetUnitScale : Quick question

09-21-2007, 09:07 AM#1
Toink
If I have a Mountain Giant unit and I set its scaling in the Object Editor field "Art Scaling Value" to 0.50 then I do:

call SetUnitScale(GetTriggerUnit(), 100, 100, 100)
Will its Scaling Value then still be 0.50 or 1. ?
09-22-2007, 08:47 PM#2
Dil999
That will set it to 100x the original size, i believe you want 1.0,1.0,1.0
09-23-2007, 04:58 PM#3
rain9441
It will be 1.0

If you use custom unit scaling values and call SetUnitScale you'll want to multiply your SetUnitScale values by the unit's scale.

Another words, take a Wisp with a customized scale value of 10.0, He'll be 10 times as big. Calling SetUnitScale of 1.0 (or 100%) will make him 1/10th as big, and calling SetUnitScale of 10.0 (or 1000%) will cause no change.

I had this issue with something I made and ended up making a table to hold the 'natural' scaling value of units, then called SetUnitScale on the unit with X*Lookup(GetUnitTypeId(MyUnit)) to keep everything consistent. I recommend the same setup.