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
Script Help help needed
Corpus Offline
Junior Member

Posts: 1
Threads: 1
Joined: Apr 2013
Reputation: 0
#1
help needed

I've been working on a script to turn off the lamps in a hallway, but unfortunately when I enter the script area nothing happens. I've checked the common "name" error and syntax but I cant seem to solve this especially since I'm a scripting noob. Here's my .hps script. Any help would be appreciated.

void OnStart()
{
AddEntityCollideCallback("", "KillTheLights", "LightsOut", true, 1);
}


void LightsOut(string &in asParent, string &in asChild, int alState)
{
SetLampLit("torch1", false, true);
AddTimer("", 2, "Out2");
}


void Out2(string &in asTimer)
{
SetLampLit("torch2", false, true);
AddTimer("", 2, "Out3");
}


void Out3(string &in asTimer)
{
SetLampLit("torch3", false, true);
AddTimer("", 2, "Out4");
}


void Out4(string &in asTimer)
{
SetLampLit("torch4", false, true);
AddTimer("", 2, "Out5");
}


void Out5(string &in asTimer)
{
SetLampLit("torch5", false, true);
AddTimer("", 2, "Out6");
}


void Out6(string &in asTimer)
{
SetLampLit("torch6", false, true);
AddTimer("", 2, "Out7");
}


void Out7(string &in asTimer)
{
SetLampLit("torch7", false, true);
AddTimer("", 2, "Out8");
}


void Out8(string &in asTimer)
{
SetLampLit("torch8", false, true);
AddTimer("", 2, "Out9");
}


void Out9(string &in asTimer)
{
SetLampLit("torch9", false, true);
AddTimer("", 2, "Out10");
}


void Out10(string &in asTimer)
{
SetLampLit("torch10", false, true);
}


void OnEnter()
{
}


void OnLeave()
{
}
04-15-2013, 03:51 PM
Find


Messages In This Thread
help needed - by Corpus - 04-15-2013, 03:51 PM
RE: help needed - by Statyk - 04-15-2013, 04:35 PM



Users browsing this thread: 1 Guest(s)