Arma 3
Light Switch Script
37 Comments
Roque_THE_GAMER  [author] May 12, 2022 @ 3:44pm 
This comment is awaiting analysis by our automated content check system. It will be temporarily hidden until we verify that it does not contain harmful content (e.g. links to websites that attempt to steal information).
AZOV-MAN May 12, 2022 @ 3:20pm 
@Roque_THE_GAMER
Is there some way to make a switch turned off on start of mission, for example, if your task to restore light in certain area ?
Echo Congo May 10, 2022 @ 7:12pm 
@Roque_THE_GAMER A little late to this now, but I found out why the switch was blowing up on me. The mod known as "Exploding Objects" makes the Transfer Switch an explode-able item. I guess I can't use that mod with this script lol.
Corporal Cal Jan 2, 2022 @ 1:08am 
That's good to know. Thanks
Roque_THE_GAMER  [author] Jan 1, 2022 @ 5:08pm 
All assets that are not maps, vehicles and gear/weapons can be used in any scenarios, even DLCs weapons/gear can be used by AI
Corporal Cal Jan 1, 2022 @ 5:07pm 
Ah brilliant. Out of curiosity, is that the case for all DLC assets?
Roque_THE_GAMER  [author] Jan 1, 2022 @ 8:44am 
The Land_TransferSwitch_01_F (Transfer Switch) is in the vanila game, its a asset from the contact DLC but you can use it in any mission without having the DLC.
Corporal Cal Jan 1, 2022 @ 5:46am 
I just figured out that the script does what I asked lol, my bad. I just need to find a similar asset to the land transfer switch that is the vanilla game.
Corporal Cal Jan 1, 2022 @ 5:18am 
I got around the exploding generator by changing the '_target SetDamage' value to 0.1.
@Rogue_THE_GAMER is there way or a script that will enable you to turn lights on and off. For example I want to make a range where I can train members in light and then they practice with NVG's
Roque_THE_GAMER  [author] Mar 17, 2021 @ 10:03pm 
the script damages the Switch and its intended, but mine does not explode, is that a mod you are using? can you still use the Switch?
Echo Congo Mar 17, 2021 @ 9:57pm 
Whenever I copy the script onto the Transfer Switch and try to use it in-game, the Switch just explodes on me. Any fixes to this?
Jonas Blane (The Unit) Mar 9, 2021 @ 4:29am 
thanks for the script
vet Jul 21, 2020 @ 10:25pm 
really sick man, thanks
Crack Jack Jul 17, 2020 @ 11:47am 
btw how do i find the generator thing
Crack Jack Jul 16, 2020 @ 12:28pm 
Aight thanks mate
Roque_THE_GAMER  [author] Jul 16, 2020 @ 11:56am 
Yes.
Crack Jack Jul 16, 2020 @ 11:08am 
Can I use this in single player?
Roque_THE_GAMER  [author] May 6, 2020 @ 1:11pm 
Maybe, you would have to reverse engineer that.
Fuze May 6, 2020 @ 1:01pm 
It's working thanks.
Is-it possible to addapt to other generator or things like this ?
Roque_THE_GAMER  [author] May 6, 2020 @ 12:24pm 
Use the one from contact, the script does nessesary checks on it.
Fuze May 6, 2020 @ 11:18am 
Hi,
I put your script in an external generator ( the CUP one ), but I can't swich on the light. When I swich off, the light disappeared but I haven't got the "swich on" obtion.
What can I do ?
McDewgle Apr 3, 2020 @ 5:04pm 
This allows you to create a light source on any object. Useful for interior lighting without using streetlamps or food lights.
McDewgle Apr 3, 2020 @ 5:03pm 
lightAttachObject *misspelled it

(init field of object)
light="#lightpoint" createVehicle [0,0,0];
light lightAttachObject [this,[0,-0.3,0]];
light setLightBrightness 1;
light setLightAmbient [0,0,0];
light setLightColor [256,20,0];
light setLightUseFlare true;
light setLightFlareSize 5;
light setLightFlareMaxDistance 500;
Roque_THE_GAMER  [author] Apr 3, 2020 @ 6:19am 
are you sure that this is the right command? I never use that and I did not find it in the wiki
McDewgle Apr 2, 2020 @ 7:53pm 
It works! Thank you.

Only issue now is that "forEach [light_1,light_2];" does not seem to work on lights created with lightAttacObject. Any ideas?
Roque_THE_GAMER  [author] Apr 2, 2020 @ 7:23pm 
At the line 13 and 38 change the forEach nearestObjects [_caller, [], DistanceToReach];
to
forEach [light_1,light_2];
You can also add more lights as you like
McDewgle Apr 2, 2020 @ 7:11pm 
How can I modify this script so that it targets lights with specific variable names instead of all lights within a certain area? Like "light_1" and "light_2".
Brasiel Jan 19, 2020 @ 5:33am 
O cara é brabo mermo
4mboss Oct 18, 2019 @ 5:56am 
Wer Scripten kann hatte das schon 2013 in Missionen! Aber eine gute Idee, es in einem Mod zu verstauen ^^
W.AXXX Oct 17, 2019 @ 11:42pm 
Very cool mod.
Better thant just explode the generator ^^.
Twiznak Oct 17, 2019 @ 5:58pm 
Hi, This adds a new flavor to task based missions. Thank you!
Jakes Oct 17, 2019 @ 1:05am 
Very nice...quick and easy
diveyez Oct 16, 2019 @ 10:30pm 
Will be featured in a new mission I am putting out soon.
[Black_Hawk_BG]_->_<-_X-Ray Oct 13, 2019 @ 5:10am 
Thank you very much again! :) I am going to test it for my own perpose as it looks great - I mean quite simple, but different to add some immersion. I am planning to make a list with such possible scripts and codes in order to create different tasks. Not 100% of the gameplay should be "kill that guy", "destroy that AA emplacement" or any other such kind of task. And the community needs some new and interesting possibilities like that differ from rescuing a downed pilot, searching for intel etc. So, if you are going to create other such scripts, feel free to share them as well. Cheers!
Roque_THE_GAMER  [author] Oct 12, 2019 @ 8:31am 
I did not really planed to use it in any other mission in the workshop, I worked in this code for a personal mission with my group, I like it and I thought It would be useful for the community.
Roque_THE_GAMER  [author] Oct 12, 2019 @ 8:28am 
Hi, I used some task modules and trigers provided by the editor, you can download this mission and open the files and check it in the editor, I did not put any other script outside the editor to make it easy for other to open and learn it.

But to make it easy, here is the mission file, umpack it into your missions folder so you can open in the editor
https://drive.google.com/file/d/1PJiU5h7KHzN_EJwYjINjjWdNEnr294xJ/view
[Black_Hawk_BG]_->_<-_X-Ray Oct 12, 2019 @ 12:07am 
This looks amazing! I have been looking for immersive scripts and mods that would make the gameplay better and more realistic. This is awesome and I'd like to use it in my future scenarios. Is it explained or shown how to complete the task like you did in the video above in the link you have posted? If not, explain it step by step, please. I believe it's quite simple, but still... Thank you very much for providing this script and your experience. Have you created anything else like it or are you planning to? :)