Jump to content
Sign in to follow this  
pescadorrr

How turn off the lights in the lighthouse and base, city,.....

Recommended Posts

Hi, how make to turn off the lighthouse and the near base lights.

I think that the light in the base are "Land_LampHalogen_F" but i not sure.

I need to do it, without player near, like a Blackout General Electric caused by a distant center.

Thx and sorry for my english...

Edited by Pescadorrr

Share this post


Link to post
Share on other sites

I don't think lights are controllable like this as yet in the alpha.

Check here for more details on the issue.

Share this post


Link to post
Share on other sites
KevsnoTrev is correct that you cannot yet switch off the lights in the Alpha. Once this is resolved, I will release my ArmA Electrical Grids script pack and addon (see my signature for my projects links to versions for A1 and A2) for A3 that will make it easy to switch off lights in a specific area or the whole island. I have also found a way to include lighthouse, runway lights, and possibly other light sources (that are not affected by swtichLight). Until then, all you can do is destroy the lights or possibly use hideObject to hide them. Edited by Loyalguard

Share this post


Link to post
Share on other sites

hey LG, look forward to the electrical grid scripts. Got a lot of good uses for that loved it in arrowhead.

Edited by KevsnoTrev

Share this post


Link to post
Share on other sites

Can we manipulate lighthouse and other preset lightsources now, in A3 full?

And how do I focus a lightsource (like its FOV)? I was considering adding #lightsources for a script.

Share this post


Link to post
Share on other sites
@Polygon

No we still can't switch on/off light. As you can see here there is a bug about that.

Voted. This must be fixed ASAP, along with enabling default A3 houses to have switchable interior lights. Would be awesome for tactical missions.

Share this post


Link to post
Share on other sites

Hi all. I am trying to figure out how to turn off the lighthouse lights. I've found a few additional threads that discuss this topic and its known issues:

- http://forums.bistudio.com/showthread.php?154446-Using-setHit-to-Damage-Multiple-Hit-Points-with-the-Same-Hit-Point-Name

- http://www.armaholic.com/forums.php?m=posts&q=23354

- http://feedback.arma3.com/view.php?id=6801

I was wondering if anyone has found a way to toggle the lighthouse lights on and off and, if so, if they would be willing to share their method (noob friendly instructions would be really appreciated as I am new to scripting).

I tried Kylania's/Pirin's example and was able to get it working from a trigger including the following in the onAct field:

0 = [0.95] execVM "lights.sqf";

...and creating lights.sqf and entering the following code:

_types = ["Lamps_Base_F", "PowerLines_base_F"];
_onoff = _this select 0;

for [{_i=0},{_i < (count _types)},{_i=_i+1}] do
{
   // powercoverage is a marker I placed.
_lamps = getMarkerPos "lightMarkerTest" nearObjects [_types select _i, 500];
sleep 1;
{_x setDamage _onoff} forEach _lamps;
};

This worked for turning off lights within the defined radius (500m for this example), but I am not sure how to create an addAction for it. I tried including addAction code in the trigger so the option to turn off the lights would come up once a player is within the radius of the trigger, but I wasn't able to do so since the reference to the script defines a value for "0":

player addAction ["Turn off lights", 0 = [0.95] execVM "lights.sqf"];

The editor gives me the following error:

Missing ]

Any ideas how this could be used with addAction?

I also tried adding the class name "Land_LampHalogen_F" into the lights.sqf script to see if it would work on the lighthouse lights as well, but it didn't. Is it because these must be used for the lighthouse lights?

Source: http://forums.bistudio.com/showthread.php?154446-Using-setHit-to-Damage-Multiple-Hit-Points-with-the-Same-Hit-Point-Name&p=2398902&viewfull=1#post2398902

object setHit ["Light_1_hitpoint", 1];
object setHit ["Light_2_hitpoint", 1];
object setHit ["Light_3_hitpoint", 1];
object setHit ["Cabin_illumination_hitpoint", 1];

If so, does anyone know how these can be used to change the hitpoint values for these lights (and possibly use them in Kylania's script example)?

Share this post


Link to post
Share on other sites

Try:

player addAction ["Turn off lights", "0 = [0.95] execVM 'lights.sqf'"];

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×