Fading objects slower

Started by Pet Terry, Sun 20/06/2004 17:37:11

Previous topic - Next topic

Pet Terry

Hello.

I'm using following script...

Quote
ObjectOn(0);
while (counter<100) {
SetObjectTransparency(0,100-counter);
Wait(1);
counter++;
}

...to fade an object. Now, I know that using counter+=2; for example will fade the object faster, but is there a way to make object fading slower?

Thanks.
<SSH> heavy pettering
Screen 7

Scorpiorus

Yes, you can also adjust a value passed to the Wait() function:

ObjectOn(0);
while (counter<100) {
   SetObjectTransparency(0,100-counter);
   Wait(10); // will wait for ten times longer
   counter++;
}

Pet Terry

Oh yes, that did the trick. Thanks!
<SSH> heavy pettering
Screen 7

TerranRich

Status: Trying to come up with some ideas...

SMF spam blocked by CleanTalk