Arma 3
Light Switch Script
37 Comments
Roque_THE_GAMER  [author] 12 May, 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 12 May, 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 10 May, 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 2 Jan, 2022 @ 1:08am 
That's good to know. Thanks
Roque_THE_GAMER  [author] 1 Jan, 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 1 Jan, 2022 @ 5:07pm 
Ah brilliant. Out of curiosity, is that the case for all DLC assets?
Roque_THE_GAMER  [author] 1 Jan, 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 1 Jan, 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 1 Jan, 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] 17 Mar, 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 17 Mar, 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) 9 Mar, 2021 @ 4:29am 
thanks for the script
vet 21 Jul, 2020 @ 10:25pm 
really sick man, thanks
Crack Jack 17 Jul, 2020 @ 11:47am 
btw how do i find the generator thing
Crack Jack 16 Jul, 2020 @ 12:28pm 
Aight thanks mate
Roque_THE_GAMER  [author] 16 Jul, 2020 @ 11:56am 
Yes.
Crack Jack 16 Jul, 2020 @ 11:08am 
Can I use this in single player?
Roque_THE_GAMER  [author] 6 May, 2020 @ 1:11pm 
Maybe, you would have to reverse engineer that.
Fuze 6 May, 2020 @ 1:01pm 
It's working thanks.
Is-it possible to addapt to other generator or things like this ?
Roque_THE_GAMER  [author] 6 May, 2020 @ 12:24pm 
Use the one from contact, the script does nessesary checks on it.
Fuze 6 May, 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 3 Apr, 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 3 Apr, 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] 3 Apr, 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 2 Apr, 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] 2 Apr, 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 2 Apr, 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 19 Jan, 2020 @ 5:33am 
O cara é brabo mermo
4mboss 18 Oct, 2019 @ 5:56am 
Wer Scripten kann hatte das schon 2013 in Missionen! Aber eine gute Idee, es in einem Mod zu verstauen ^^
W.AXXX 17 Oct, 2019 @ 11:42pm 
Very cool mod.
Better thant just explode the generator ^^.
Twiznak 17 Oct, 2019 @ 5:58pm 
Hi, This adds a new flavor to task based missions. Thank you!
Jakes 17 Oct, 2019 @ 1:05am 
Very nice...quick and easy
diveyez 16 Oct, 2019 @ 10:30pm 
Will be featured in a new mission I am putting out soon.
[Black_Hawk_BG]_->_<-_X-Ray 13 Oct, 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] 12 Oct, 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] 12 Oct, 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 12 Oct, 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? :)