Rav_Raven 8 Posted March 11, 2009 I need the AI will automatically switch the lights of vehicles approaching from the base, but the command: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unit action [ "Lighton", targetVehicle] Seems to have no effect. Someone to find another alternative? Share this post Link to post Share on other sites
Namikaze 0 Posted March 11, 2009 I'm just taking a stab in the dark (pun definitely intended! but have you tried capitalizing the "O" in "LightOn"? Share this post Link to post Share on other sites
Rav_Raven 8 Posted March 11, 2009 Yes, but without success. Share this post Link to post Share on other sites
kronzky 5 Posted March 11, 2009 If I remember correctly, the AI will only turn the lights on if they're in safe or careless mode. Share this post Link to post Share on other sites
M.Andersson(SWE) 4 Posted March 11, 2009 Yea that sux... Shuld be able to order that... Same with the engine. With ace you need to worry about fuel...Thus i need my AI to turn of the engine... Share this post Link to post Share on other sites
ProfTournesol 956 Posted March 11, 2009 Anyway, it isn't : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unit action [ "Lighton", targetVehicle] but : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unit action ["Light on", targetVehicle] And targetvehicle is useless : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unit action ["Light on"] is enough. But it's true that it depends also on unit's behaviour. So you only need to switch unit's behaviour to "safe" or "careless" to have lights turned on. Share this post Link to post Share on other sites
dr_eyeball 16 Posted March 11, 2009 Edit: Info appears to be incorrect. It has no space. <s>if the correct spelling is confirmed to be "light on" (with a space), then the wiki should be corrected to reflect this.</s> Odd that every other action is without a space. http://community.bistudio.com/wiki/Armed_Assault:_Actions_List#LightOn Share this post Link to post Share on other sites
Rav_Raven 8 Posted March 12, 2009 Thank you all. indeed, the behavior of the AI and more precisely its combatmode is what controls the on / off of lights. The actions: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unit action [ "Light on", targetVehicle] or unit action [ "Lighton", targetVehicle] are useless in this case despite what the wiki says. Share this post Link to post Share on other sites
ProfTournesol 956 Posted March 12, 2009 Quote[/b] ]if the correct spelling is confirmed to be "light on" (with a space), then the wiki should be corrected to reflect this. Odd that every other action is without a space. Sorry, didn't realize that actions syntax did change since Ofp. Sorry again. Share this post Link to post Share on other sites
kronzky 5 Posted March 12, 2009 The correct syntax is "lighton" & "lightoff", but that action only works persistently with empty vehicles. If the vehicle is AI controlled the command will cause the light to switch momentarily, but will be reset right away by the AI. To control the lights of AI-controlled vehicles, set their behavior to "combat" or "stealth" to turn it off. Any other behavior modes will cause them to drive with the lights on. Another situation is where the player is the driver of the vehicle. If you have the "Light On/Off" option in your action menu, then you can either (obviously) control it via the action menu, or via the action command. If you don't see the light action, then that means that some other (AI) unit is the commander of the vehicle (e.g. the gunner in an M2 HMMWV), who is then also charge of the driving/behavior mode, and therefore the light status. In that case you'd have to set the commander/gunner of the player-driven vehicle to mode "combat" or "stealth" in order for the light to be turned off. Share this post Link to post Share on other sites
fasad 1 Posted March 13, 2009 if what I had put in the wiki was correct, AI will automatically turn on/off lights depending on daylight (if allowed by current behaviour mode). I'll do a quick test... edit : still holds true Share this post Link to post Share on other sites
Rav_Raven 8 Posted March 13, 2009 I need a script that works for the setting of a base. The vehicles (planes and helicopters) to get closer to the base at night, turn-on the lights and turn-off to their missions. The vehicles are dynamically created. Even so, the command Lighton, combined with beaviour and combatmode are not effective. Share this post Link to post Share on other sites