OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Mostly on 26 Jan 2009, 17:58:15
-
I want to completely disable lights on some vehicles my squad are using. I know that by setting behaviour to combat makes them switch them off, but even in combat mode there are occassions when they turn the lights on. This happens if the player disembarks the vehicle first or if men are ordered into the vehicle as a gunner or passenger if there is no driver.
I've searched the forum and found a few similar questions posted a few years ago but no one managed to solve the problem. Has anyone come up with an answer yet?
I've been looking in the config file of the vehicle's I'm using but can't see any coding for the lights. Is the coding for vehicle lights buried deep in the game itself?
-
Lights are pretty much down to the model file itself.
If the model has lights the engine takes care of the rest, afaik the only sure way to disable lights is to use a model that has none provided.
Incidentally the lights config-wise are in the LandVehicle class in the bin.pbo config and further changed in the wheeled.pbo config for various vehicles to suit them.
To remove lights from them all would involve a lot of work and would mean having to alter game files.
Planck
-
Hey there Mostly, please refer to tutorial on "actions" for Operation Flashpoint.
List of Action:
CLIC HERE (http://www.ofpec.com/ed_depot/index.php?action=details&id=43&game=ArmA)
Also conviently, it's by Planck.
There is a "Turn Off" action in there that will disable their lights, I know I've used it before, if you need more help please ask. :)
-
Thanks for the info, but the action list shows as a "corrupted or damaged file" and I can't open it!
A very quick tutorial would be much appreciated.
Cheers.
-
The resource has apparently been fixed, thanks to our intrepid troubleshooter ..... bedges. :yes:
Planck
-
Mostly, Here is a small tutorial I made using these commands.
Name setbehaviour "SAFE" <~~~ Activates Lights
Name Setbehaviour "Combat" <~~~ Deactivates lights.
Also this is the code for the light off action command.
LIGHT OFF
vehiclename action ["light Off",vehiclename]
vehiclename action ["light Off"] also works.
Vehiclename switches off its lights.
However, the light is immediately switched on again if the unit is in "SAFE" or "CARELESS" modes.
Light goes off if player is pilot, and stays off until switched on again.
M2 machinegun lights do not seem to work the same.
A loop is needed to keep it off and even that is not too satisfactory.
Thanks Planck, but this command doesn't work, the light switches off in a split second and switches back on instantly.
That's why I used the "Setbehaviour command instead.
Hope it helps.. :)
See attatchment below this thread.
-
Indeed, this is why I said:
"However, the light is immediately switched on again if the unit is in "SAFE" or "CARELESS" modes."
You need to read the whole description.
Planck
-
Ok, copy that, What i did was created a trigger around a jeep and when the player entered the trigger it would make the jeep turn the lights off.
So it's accomplished. Hopefully Mostly can use it now. :)
-
Mostly stated that he knew about switching behaviour made them switch lights off, but he found times when this was not the case and therefore wanted to disable the lights completely.
I know that by setting behaviour to combat makes them switch them off, but even in combat mode there are occassions when they turn the lights on. This happens if the player disembarks the vehicle first or if men are ordered into the vehicle as a gunner or passenger if there is no driver.
Planck