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
Turning on lights when entering a scriptarea
LulleBulle Offline
Member

Posts: 101
Threads: 33
Joined: Feb 2012
Reputation: 0
#10
RE: Turning on lights when entering a scriptarea

(02-25-2012, 05:15 PM)SilentStriker Wrote:
(02-25-2012, 05:13 PM)LulleBulle Wrote:
(02-25-2012, 04:48 PM)SilentStriker Wrote: Just put a script area where ever you want the lamps to be lit and use a AddEntityCollideCallback and then in the function you call you put the code i wrote
i tried this:

void OnStart()
{
AddEntityCollideCallback("Player", "LightOn", "Lights", true, 1);
}
void Lights(string &in asParent, string &in asChild, int alState)
{    
SetLampLit("torch_static01_*", true);
}

It didn't work
because it should look like this


void OnStart()
{
AddEntityCollideCallback("Player", "LightOn", "Lights", true, 1);
}
void Lights(string &in asParent, string &in asChild, int alState)
{    
for(int x=1; x <= 3; x++) SetLampLit("torch_static01_"+x, true, true);
}


Why can't I index the torches?


Also, it worked perfectly.
(This post was last modified: 02-25-2012, 05:26 PM by LulleBulle.)
02-25-2012, 05:21 PM
Find


Messages In This Thread
RE: Turning on lights when entering a scriptarea - by LulleBulle - 02-25-2012, 05:21 PM



Users browsing this thread: 1 Guest(s)