Hey, I'm currently working on a little strategy game, so far so good, you can select and move the tanks, particle animations for shooting and smoke etc. One minor confusing hiccup, however. The units above their heads have little billboards that should indicate their health. I'd like to scale this based on the units health. Here is the line to do so: transform.Find("bb_Health").transform.Scale.x = 3*((100-Health)/100); However, Unity complains that "Scale" is not a member of Transform. I get the same error for "scale" How do I alter the scale of the object realtime? Cheers, Thordis
Code (csharp): transform.localScale.x http://unity3d.com/Documentation/ScriptReference/Transform-localScale.html
Ah thanks, I couldn't get it to work at first, and tried about a hundred things, but in the end the solution was to break it up into atleast two lines: var bbHealth : Transform = transform.Find("bb_Health"); bbHealth.localScale.x = 3.0*((Health)/100.0); Now it works like a dream, thank you. Cheers