Page MenuHomeFeedback Tracker

Add command to force helo reflectors to be turned on
Reviewed, WishlistPublic

Description

As title says, add a command to force the AI to turn on the helicopter's reflectors.
As of now the command enablegunlights "forceOn" works only with collision lights and not the main reflector below the airframe.

Details

Legacy ID
2602560264
Severity
None
Resolution
Open
Reproducibility
Always
Category
AI Control / Commanding

Event Timeline

Chairborne edited Additional Information. (Show Details)
Chairborne set Category to AI Control / Commanding.
Chairborne set Reproducibility to Always.
Chairborne set Severity to None.
Chairborne set Resolution to Open.
Chairborne set Legacy ID to 2602560264.May 7 2016, 6:54 PM
oukej added a comment.Jul 7 2014, 4:03 PM

Hey, thank you for your feedback.

On an empty helicopter you can use
player action ["collisionlightOn", VEHICLE]
for collision lights and
player action ["lightOn", VEHICLE]
for the search light.
https://community.bistudio.com/wiki/ArmA:_Actions#LightOff

The AI will however manage the lights on its own depending on its current behavior and the searchlight is not included.

Will keep you informed.

mestoth added a subscriber: mestoth.May 7 2016, 6:54 PM

@oukej,

This is unfortunately not the case from attempting to use this feature. It works as described for every vehicle EXCEPT helicopters (and i am told by others all pilots).

whilst the command you posted DOES turn the light on, the AI pilot turns it off after 0.2 seconds.

The only current solution is to turn it on every 0.01 seconds via a sleep loop, which is not appropriate!

It does not matter what behavior your set it to, even in careless helicopters still turn off the search light (but leave the collisions on).

setting the unit, or yourself as captive makes no difference either (or both!).

Yes, although not directly a fix for the broken AI:

http://forums.bistudio.com/showthread.php?185632-Helicopter-Search-Lights-(AI)-without-sleep-command-(post-1-34)&p=2819704#post2819704

we found a solution that doesnt require a sleep command.
Create a script file and get the helicopter to exec that script.
In the script file put:
_type = typeOf _this;
_copy = _type createVehicle getPos _this;
_copy attachTo [_this, [0,0,0]];
_copy setPilotLight true;
_copy setCollisionLight true;

where _this is the chopper (dont need to rename the choppers, the _this is just for the script to work).

It clones the chopper, without a pilot and turns the lights on and attaches it to the existing chopper. In the first post (my post linked above) I found that waiting for ~30 seconds (sleep 30) after the chopper takes off before attaching the clone worked best -> sometimes they would explode if the ground was not perfectly flat, but in the air it wasnt an issue.

In summary to the Dev that posted: The AI Pilot will NEVER choose to leave the search light on with that command. No matter how you tweak it, the pilot AI turns it off (even if your both on the same side or captive).