Arma 3
Not enough ratings
[CCC] - Simple Disablable Lights
   
Award
Favorite
Favorited
Unfavorite
Data Type: Composition
Meta: Dependency
File Size
Posted
1.725 KB
8 Feb @ 2:16am
1 Change Note ( view )

Subscribe to download
[CCC] - Simple Disablable Lights

Description
Super simple way of adding functionality to cut power to a placed building.

Uses the following to have a scroll interaction to disable lights on an attached building (or buildings) through switchLight:

this addAction ["Pull Fuse", {[building variablename] switchLight "OFF"; playSound3D ["a3\sounds_f\sfx\special_sfx\sparkles_wreck_2.wss", player];}];

This does not removeAction once complete, that's my preference but up to you.

An alternative way to do this is with individual lights and setDamage, like so;

this addAction ["Pull Fuse", {l1 setdamage 0.99, l2 setdamage 0.99, l3 setdamage 0.99; playSound3D ["a3\sounds_f\sfx\special_sfx\sparkles_wreck_2.wss", player];}];

Lamps like 'Land_TentLamp_01_suspended_F' when set to 0.99 will remain in place and not be 'destroyed', will just turn off.

This is supplied with a ''Transformer'' from O&T Expansion Eden and a CUP Terrains building, but will work with all sorts of different assets. It won't work with a lot of default buildings which lack lighting sadly. Contact has 'Transfer Switch' which you can probably add anims and other stuff to, which I haven't explored.

If you want to use switchLight for a wider area (ie to cut power to a town at a transformer or transmission tower) you can also do by radius, see BI Wiki[community.bistudio.com]. This can also be combined with the object (transmission tower) as a destructible. Super cinematic!

Someone has probably made something similar or identical to this in the past - i make no claim to originality, just a desire to make life easier for you and save the time on research I spent.