Jump to content
Sign in to follow this  
Victim9l3

Lights on off autonomous

Recommended Posts

I have been trying to get the autonomous ground vehicles to keep it's lights off and have not had success. If I take controls I can get lights off but once I release the lights come on. Since they are autonomous I would like to leave the guns unattended and let them surprise the enemy. I tried sync them to the Setmode module but the stealth does nothing. Also tried contolling it and giving waypoints but there is no stealth option. Thanks

Just tried giving it waypoints in the editor. They move to waypoint but ignore stealth command

Edited by Victim9l3

Share this post


Link to post
Share on other sites

Been playing with lights on vehicles myself.

Found this courtesy of F2k Sel which I tweaked a bit.

Just name your UGV 'UGV1' and put this in the init field.

null=[] spawn { while {true} do {  player action ["lightOff", UGV1]; player action ["collisionlightOff", UGV1]; sleep 0.000000001};};

It's quick and dirty and I'm sure there's a better way, but might get you started. I'm sure someone else will be able to refine it from here.

The idea behind it is that the 'sleep' action will repeatedly turn the light off faster than the AI can turn it on.

E

Share this post


Link to post
Share on other sites

Thanks. I was going to try the scripting command that shuts off lights but it never worked. I might still try it in this version but i'll try your way first. I do have a question though. What if I or anyone turns the lights on? Will it go back to normal or will your code still work after?

Share this post


Link to post
Share on other sites

Not sure, but theoretically if you could set this command to trigger ONLY when you are NOT in control of the UGV then that should work.

You could turn the light off and on when in control, but it would stay off as soon as you release control.

I'm afraid I can't be much more help than that at this point.

Share this post


Link to post
Share on other sites

Thanks but your code doesn't work. The game freezes at the end of the loading phase, right before game mission starts.

Share this post


Link to post
Share on other sites

Anyone got any Intel on how to turn ground lights off and street lights with out the damage work around ?

Share this post


Link to post
Share on other sites
On 8/22/2013 at 10:27 PM, Electricleash said:

null=[] spawn { while {true} do {  player action ["lightOff", UGV1]; player action ["collisionlightOff", UGV1]; sleep 0.000000001};};
 

Tried this now. It works on the Darter, but it caused insane blinking on an enemy ifrit, and on a player-controlled Grayhawk.

It does not seem to matter whether it's put in the AI or player init field or the init field of the vehicle.

Share this post


Link to post
Share on other sites

according to the wiki https://community.bistudio.com/wiki/Arma_3_Lights

 

_vehicle disableAI "LIGHTS"; // override AI

_vehicle setPilotLight false; // force switch headlights off

 

ive just tried this with a UGV in the init and it works. Lights will be off at start, can be turned on and of when you take control and will stay in off state when you release control.

 

  • Like 2
  • Thanks 1

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  

×