Jump to content
Sign in to follow this  
pipyn1970

car lights off

Recommended Posts

Hi guys, can someone please tell me the code to force a vehicle lights off? Ive got this truck at an LZ with ai manning the gun but i cant get the lights off.

Many thanks

Share this post


Link to post
Share on other sites

LightOff

Description: Turns off the headlights of an empty vehicle. If the vehicle is AI-controlled (either as the lone driver, or as the commander/gunner) then the light status depends on the AI's behaviour mode ("combat" or "stealth" = lights off, any other mode = lights on).

Syntax: unit action ["lightOff", targetVehicle]

Where unit is any unit (no action animation is performed) and targetVehicle is a vehicle with lights.

Example: player action ["lightOff", vehicle player];

LightOn

Description: Turns on the headlights of an empty vehicle. If vehicle is AI-controlled, see notes under the LightOff action.

Syntax: unit action ["lightOn", targetVehicle]

Where unit is any unit (no action animation is performed) and targetVehicle is a vehicle with lights.

Example: player action ["lightOn", spotLight];

Share this post


Link to post
Share on other sites

Thanks Jim, I was almost right. I was putting in the vehicle init this action [lightOff, car1];

I didn't even think about setting the gunner as stealth or combat.

Thanks again, I will try it out soon

Share this post


Link to post
Share on other sites

Hi Jim, nothing works. The empty vehicle with the ai gunner in still has lights on even thou the ai is set to stealth or combat & this action ["lightOff", jackal1]; is in the vehicle's init.

Share this post


Link to post
Share on other sites

Hiya Pipyn;

Put down two ai nato guys and empty Hunter GMG vehicle and name it Hunter, and on leaders init put, this addAction ["lightOff", "Hunter"]; make sure vehicle has no fuel give them a getin nearest waypoint set to combat with this on the activation part, this moveInGunner Hunter;

Edited by Jim Brown
Forgot to name vehicle

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×