05-27-2015, 09:46 AM
Hi, so I have a 'for' loop that won't work. It doesn't give me errors, but when I walk into the area nothing happens.
Here's the code:
{
AddEntityCollideCallback("Player", "Lights_Fade_area", "Lights_Fade", true, 0);
}
void Lights_Fade(string &in asParent, string &in asChild, int alState)
{
for(int i = 9; i >= 0; i--)
{
FadeLightTo("torch_floor_" + i, 0, 0, 0, 1, -1, 9 - i);
}
}
Here's the code:
{
AddEntityCollideCallback("Player", "Lights_Fade_area", "Lights_Fade", true, 0);
}
void Lights_Fade(string &in asParent, string &in asChild, int alState)
{
for(int i = 9; i >= 0; i--)
{
FadeLightTo("torch_floor_" + i, 0, 0, 0, 1, -1, 9 - i);
}
}