scaling a gui texture

I've asked this on the forum, but haven't been given too much direction yet, hoping for some more information.

In my playerCollision file I set the variable when objects get picked up:

ScoreKeeper.temperatureAdjust = 5 ; 

In my scorekeeper file I apply different textures and track the temperature, displaying a different picture with a higher temperature based on time minus the number from picked up objects that keep things cool.

static var temperatureAdjust : int = 0 ; 

function Update () 
{ 
TemperatureUpdate(); 
} 

function TemperatureUpdate () 
{ 

var temperature : int = (Time.time - temperatureAdjust) ; 

if ((temperature >= 111 ) && (temperature <= 120)) 
{ 
guiTexture.texture = temperature12tex; 
guiTexture.enabled = true ; 
} 
else if ((temperature >= 101 ) && (temperature <= 110)) 
{ 
guiTexture.texture = temperature11tex; 
} 

I'm not quite sure why the above isn't working. The the if statements continue in increments of 10, until it gets to zero, where the game begins.

This is basically an alternative to a timer, based on keeping down the temperature. I'm trying to figure out what might be wrong with this, and also if possible just scale the gui instead of using different textures, because it would be more accurate and require less images to load.

thanks for any help with this.

Instead of using a GUI Texture, consider using just a regular texture on a quad that's either a child of the camera (so it stays in the same place when the camera moves) or rendered using a separate camera. That way you can scale it, move it, or change the material just like any other game object.

It is possible to scale a GUITexture by changing it's pixelInset variable. Here's a sample:

guiTexture.pixelInset.width += 20;