tankguy67 1 Posted December 27, 2017 I cannot seem to figure it out, collision lights go on fine but the regular lights or the "searchlight" never go on. Share this post Link to post Share on other sites
Jnr4817 215 Posted December 27, 2017 Here is a script for the hellcat, could easily be adapted to other airframes. @pierremgi might be able to help you also. Thanks Share this post Link to post Share on other sites
zagor64bz 1225 Posted December 27, 2017 Yap....@pierremgi is the man..here's a script from him which works very well... Spoiler Here is my movable searchlight. (SP / MP) You have to name the helicopter : hellcat. I have to define a global variable SL1 for the search light. Don't forget to script a SL2 , SL3 for different search lights if you need it. // In initPlayerLocal.sqf (or run that locally when player exists: 0= [] spawn {waitUntil local player}; ...} ) //___________________________________________________________ toggle_SL = 0; _SL_on = { player addAction ["<t color='#11ff11'>S.L. On</t>", { params ["_tgt","_caller","_id"]; private _SLMenu = (_tgt actionParams _id) select 0; if (_SLMenu isEqualTo "<t color='#11ff11'>S.L. On</t>") then { _SLMenu = "<t color='#ff1111'>S.L. Off</t>"; _caller action ["SearchlightOn",vehicle _caller]; missionNamespace setVariable ["SLBright",0.9,true]; missionNamespace setVariable ["SLAmbient",[2.3, 2.3, 2.55],true]; } else { _SLMenu = "<t color='#11ff11'>S.L. On</t>"; _caller action ["SearchlightOff", vehicle _caller]; missionNamespace setVariable ["SLBright",0,true]; missionNamespace setVariable ["SLAmbient",[0,0,0],true]; }; (_this select 1) setUserActionText [(_this select 2),_SLMenu]; },nil,0.8,false,true,"", " _this == (vehicle _this) turretUnit [0] && vehicle _this == hellcat"] }; call _SL_on; player addEventHandler ["respawn", {call _SL_on}]; }; // in init.sqf (or run that on all clients) //________________________________________________ SL1 = "#lightpoint" createVehicleLocal [0,0,0]; SL1 setLightBrightness 0; SL1 setLightAmbient[0,0,0]; SL1 setLightColor[230, 230, 255]; SL1 setLightUseFlare true; SL1 setLightFlareSize 100; addMissionEventHandler ["EachFrame", { if (local (hellcat turretUnit [0])) then { _ins = lineIntersectsSurfaces [AGLToASL positionCameraToWorld [0,0,5],AGLToASL positionCameraToWorld [0,0,300],hellcat,objNull,true,1,"VIEW","NONE"]; if (count _ins > 0) then { missionNamespace setVariable ["SLpos",(_ins select 0 select 0),true] }; }; SL1 setPosASL (missionNamespace getVariable ["SLpos",[0,0,0]]); SL1 setLightBrightness (missionNamespace getVariable ["SLBright",0]); SL1 setLightAmbient (missionNamespace getVariable ["SLAmbient",[0,0,0]]); }]; NOTA : you need to specify : vehicle _this == hellcat (name of helicopter) in the condition of addAction. 1 1 Share this post Link to post Share on other sites
Tostm8 1 Posted December 28, 2017 This might help - Actions: Light Off / On Share this post Link to post Share on other sites
pierremgi 4875 Posted December 28, 2017 58 minutes ago, ToastyBuns4Life said: This might help - Actions: Light Off / On Depending on the behavior of the driver. Share this post Link to post Share on other sites
Tostm8 1 Posted December 28, 2017 Yeah but an easier way if not in those combat modes. Share this post Link to post Share on other sites
pierremgi 4875 Posted December 28, 2017 No. Definitely, lightOff /On actions don't work on Hellcat. You need to use "searchLightOn" / off (on copilot) and "collisionLightOn" / off (on Pilot), then loop that at high rate (sleep 0.1) if you want something useful for all behaviors. The script mentioned by zagor64bz is something totally different, addAction on player, while gunner, to dramatically improve the search light. 2 Share this post Link to post Share on other sites
zagor64bz 1225 Posted December 28, 2017 2 hours ago, pierremgi said: The script mentioned by zagor64bz is something totally different, addAction on player, while gunner, to dramatically improve the search light. Yeah.. maybe he's looking for something like this... https://www.youtube.com/watch?v=ZLGJHO_WZtc http://steamcommunity.com/sharedfiles/filedetails/?id=779558222 Share this post Link to post Share on other sites