This is c-script code to make characters blink/swap one of two textures a small percentage of time. It's hitting frame rate hard by increasing the milliseconds of "functions" displayed on F11 during game play. I think it's making another huge hit even when taken out because all of the characters that utilize it need two instead of 1 map. Not sure about that though-- need more testing.
It is called within a while loop within another script that rotates the standing npcs to view the player. Help appreciated.
function blink()//called in viewPlayer
{
var blink;
while(1)
{
blink = random(100);
if(blink <= 98)
{
my.skin = 1;
}
else
{
my.skin = 2;
}
wait (1);
}
}
Last edited by vertex; 07/30/09 11:50. Reason: changed old comment to refer to proper function