The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help with a 'for' loop
Kullin1337 Offline
Junior Member

Posts: 8
Threads: 2
Joined: Apr 2015
Reputation: 0
#1
Need help with a 'for' loop

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);
}
}
05-27-2015, 09:46 AM
Find


Messages In This Thread
Need help with a 'for' loop - by Kullin1337 - 05-27-2015, 09:46 AM
RE: Need help with a 'for' loop - by Mudbill - 05-27-2015, 10:04 AM
RE: Need help with a 'for' loop - by Kullin1337 - 05-31-2015, 03:58 PM
RE: Need help with a 'for' loop - by Daemian - 05-31-2015, 11:56 PM
RE: Need help with a 'for' loop - by Kullin1337 - 06-01-2015, 11:20 AM



Users browsing this thread: 1 Guest(s)