![]() |
Turning on lights when entering a scriptarea - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Turning on lights when entering a scriptarea (/thread-13556.html) |
Turning on lights when entering a scriptarea - LulleBulle - 02-24-2012 Could anyone tell me which code to use to turn on torches when entering a scriptarea (multiple torches) RE: Turning on lights when entering a scriptarea - Obliviator27 - 02-24-2012 SetLampLit. Use Indexes. Torch_1 Torch_2 Torch_3 All will be turned on if you use Torch_* RE: Turning on lights when entering a scriptarea - LulleBulle - 02-24-2012 Thanks man ![]() (02-24-2012, 10:09 PM)Obliviator27 Wrote: SetLampLit. Use Indexes. RE: Turning on lights when entering a scriptarea - LulleBulle - 02-25-2012 Someone mind telling me how to do this? ![]() RE: Turning on lights when entering a scriptarea - SilentStriker - 02-25-2012 To make all the lamps lit at the same time you use for(int x=1; x <= 3; x++) SetLampLit("torch_"+x, true, true); change the 3 to the amount of torches you have RE: Turning on lights when entering a scriptarea - LulleBulle - 02-25-2012 (02-25-2012, 03:10 PM)SilentStriker Wrote: To make all the lamps lit at the same time you use Yea but where do i put the script area? RE: Turning on lights when entering a scriptarea - SilentStriker - 02-25-2012 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 RE: Turning on lights when entering a scriptarea - LulleBulle - 02-25-2012 (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 wrotei tried this: Code: void OnStart() It didn't work RE: Turning on lights when entering a scriptarea - SilentStriker - 02-25-2012 (02-25-2012, 05:13 PM)LulleBulle Wrote:because it should look like this(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 wrotei tried this: Code: void OnStart() RE: Turning on lights when entering a scriptarea - LulleBulle - 02-25-2012 (02-25-2012, 05:15 PM)SilentStriker Wrote:(02-25-2012, 05:13 PM)LulleBulle Wrote:because it should look like this(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 wrotei tried this: Why can't I index the torches? Also, it worked perfectly. |