clydefrog 3 Posted December 15, 2013 (edited) I know this has been spoken about before but I can't find the Arma 3 thread about it so I can't reply to that. I've just been bringing an old mission up to date that uses a script to turn lights off in an area (made by kylania I think), but the street lamps no longer turn off so the classnames must have changed. Here is the script: // off: 0 = [0.95] execVM "lights.sqf"; // on: 0 = [0] execVM "lights.sqf"; _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 "powerCoverage" nearObjects [_types select _i, 500]; sleep 1; {_x setDamage _onoff} forEach _lamps; }; I have found one of them for the wooden pole street lamps but after trying that many other different types of lights remained on. How can I amend this script to turn off every type of light in the area? Also is there an easy way of finding out the classname of map objects? ---------- Post added at 14:56 ---------- Previous post was at 14:30 ---------- Nevermind thanks to this thread (http://forums.bistudio.com/showthread.php?168808-99-working-lights-out-script-via-trigger-needs-your-help) I have found somebody with the exact same problem using the same script as me and a solution. However I would still like to know how you can find the classnames for certain objects on the map. Edited December 15, 2013 by clydefrog Share this post Link to post Share on other sites
bangabob 45 Posted December 15, 2013 (edited) I think there is a slight problem with your syntax. // off: 0 = [0.95] execVM "lights.sqf"; // on: 0 = [0] execVM "lights.sqf"; _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 "powerCoverage" nearObjects [[_types select _i], 500]; //ADDED BRACKETS sleep 1; {_x setDamage _onoff} forEach _lamps; }; Actually just noticed you are using nearObjects. Not nearestObjects. Nevermind Edited December 15, 2013 by BangaBob Not the same nearobject Share this post Link to post Share on other sites
mad_cheese 593 Posted December 15, 2013 Is this what you ware looking for? Share this post Link to post Share on other sites
big_wilk 12 Posted December 15, 2013 demo: https://www.dropbox.com/s/tpt2esi6q3m98uc/Intel%40LightsOff.Stratis.rar Share this post Link to post Share on other sites