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
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#13
RE: Quick Question

(09-29-2011, 12:19 AM)Tanshaydar Wrote:
void TestActive(string &in asParent, string &in asChild, int alState)
{
           SetSwingDoorClosed("castle_1", true, true);
           for (int i=8; i < 23; i++)
           {
                      AddTimer("LightOff"+i, i-7, "LightOff");
           }
}

void LightOff(string &in asTimer)
{
    SetLampLit("torch_static01_"+StringSub(asTimer,8,9), false, true);
}

It'd be more efficient if you pass the name of the entity into the timer name.

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

void LightOff( string &in asTimer)
{
    SetLampLit(asTimer, false, true);
}

Tutorials: From Noob to Pro
(This post was last modified: 09-29-2011, 02:13 AM by Your Computer.)
09-29-2011, 02:11 AM
Website 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: 1 Guest(s)