Fade In Problems

Started by Monk, Wed 02/07/2008 17:39:51

Previous topic - Next topic

Monk

i am using this code to have my title (its an object) fading in... its working.. but now it also looping endless and make my title blinking... anyone please help me?

Code: ags
function room_Load()
{
object[0].Transparency = 100;
}
function room_RepExec()
{
int trans = 100;
while (trans > 0) {
trans--;
object[0].Transparency = trans;
Wait(1);
}
}

TwinMoon

#1
Rep_exe is used to do something every game cycle.
So every game cycle, trans is set to 100 and object[0] fades in.

Move everything in room_RepExec to room_AfterFadein to the function room_Load, that should fix your problem.

Monk

#2
i moved it onto this..

Code: ags
function room_Load()
{
object[0].Transparency = 100;
}

function room_AfterFadeIn()
{
int trans = 100;
while (trans > 0) {
trans--;
object[0].Transparency = trans;
Wait(1);
}
}


ITS WORKING!!!! thank you very very much!

SMF spam blocked by CleanTalk