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
Quick Question
Kurask Offline
Junior Member

Posts: 5
Threads: 1
Joined: Sep 2011
Reputation: 0
#11
RE: Quick Question

Can someone show me how to reduce the LightOff functions into a few lines rather than 60 lines? Here is what I made so far, and it works perfectly fine, I just think it should take less lines to do.


void TestActive(string &in asParent, string &in asChild, int alState)
{
          SetSwingDoorClosed("castle_1", true, true);
          for (int i=8; i < 23; i++)
          {
                     AddTimer("", i-7, "LightOff"+i);
          }
}

void LightOff8(string &in asTimer)
{
SetLampLit("torch_static01_8", false, true);
}
void LightOff9(string &in asTimer)
{
SetLampLit("torch_static01_9", false, true);
}
void LightOff10(string &in asTimer)
{
SetLampLit("torch_static01_10", false, true);
}
void LightOff11(string &in asTimer)
{
SetLampLit("torch_static01_11", false, true);
}
void LightOff12(string &in asTimer)
{
SetLampLit("torch_static01_12", false, true);
}
void LightOff13(string &in asTimer)
{
SetLampLit("torch_static01_13", false, true);
}
void LightOff14(string &in asTimer)
{
SetLampLit("torch_static01_14", false, true);
}
void LightOff15(string &in asTimer)
{
SetLampLit("torch_static01_15", false, true);
}
void LightOff16(string &in asTimer)
{
SetLampLit("torch_static01_16", false, true);
}
void LightOff17(string &in asTimer)
{
SetLampLit("torch_static01_17", false, true);
}
void LightOff18(string &in asTimer)
{
SetLampLit("torch_static01_18", false, true);
}
void LightOff19(string &in asTimer)
{
SetLampLit("torch_static01_19", false, true);
}
void LightOff20(string &in asTimer)
{
SetLampLit("torch_static01_20", false, true);
}
void LightOff21(string &in asTimer)
{
SetLampLit("torch_static01_21", false, true);
}
void LightOff22(string &in asTimer)
{
SetLampLit("chandelier_large_1", true, true);
}
(This post was last modified: 09-29-2011, 12:07 AM by Kurask.)
09-29-2011, 12:04 AM
Find


Messages In This Thread
Quick Question - by Kurask - 09-27-2011, 02:04 AM
RE: Quick Question - by Your Computer - 09-27-2011, 02:13 AM
RE: Quick Question - by Kurask - 09-27-2011, 02:23 AM
RE: Quick Question - by Pr3d4t0r - 09-27-2011, 02:52 AM
RE: Quick Question - by Tanshaydar - 09-27-2011, 02:52 AM
RE: Quick Question - by Pr3d4t0r - 09-27-2011, 02:56 AM
RE: Quick Question - by Tanshaydar - 09-27-2011, 03:14 AM
RE: Quick Question - by Kurask - 09-27-2011, 01:29 PM
RE: Quick Question - by Acies - 09-27-2011, 05:12 PM
RE: Quick Question - by Kurask - 09-27-2011, 07:39 PM
RE: Quick Question - by Kurask - 09-29-2011, 12:04 AM
RE: Quick Question - by Tanshaydar - 09-29-2011, 12:19 AM
RE: Quick Question - by Your Computer - 09-29-2011, 02:11 AM
RE: Quick Question - by Tanshaydar - 09-29-2011, 02:21 AM



Users browsing this thread: 2 Guest(s)