Addons & Mods Depot > Arma2 - Configs & Scripting

How to change the color of a light

(1/1)

McSpuds:
I am working on a new airfield on my map.  The traditional way we have been doing the runway lighting is to use "conelights" and setting the elevation to a minus. 

Initialization:

--- Code: ---this setPos [getPos this select 0, getPos this select 1, -0.500]
--- End code ---

The conelight is a small red and white cone with a yellow lamp on top that is lighted at night.  Adding several of these in a row gave us a nice set of runway lights.

I am trying to change the color of the lamp from a yellow hue to a blue, red or green.

Any Ideas?

Gnat:
Assuming you have identified the correct one to us ....
The ALLINONE Config from DevHeaven is a #1 source of config information.
Seacrhing "conelight" gave me this;


--- Code: --- class Land_coneLight: Thing
{
scope = 2;
vehicleClass = "signs";
simulation = "thing";
animated = 0;
model = "\CA\Structures\Misc\Armory\coneLight\coneLight";
icon = "\ca\data\library\data\icons\road_cone_CA.paa";
mapSize = 0.1;
displayName = "Road cone (light)";
accuracy = 0.2;
class DestructionEffects
{
};
class MarkerLights
{
class YellowBlinking
{
name = "zluty pozicni blik";
color[] = {0.99,0.69,0.17,1};
ambient[] = {0.099,0.069,0.017,1};
brightness = 0.01;
blinking = 1;
};
};
};

--- End code ---

So all you need to do is make a new object thats a copy, but with different light;

--- Code: ---class CfgPatches
{
class SPU_Lights
        {
units[] = {};
weapons[] = {};
requiredVersion = 1.0;
};
};
class CfgVehicles
{
class Land_coneLight;
class Land_SPUconeLight2: Land_coneLight // inherit all other parameters, except those stated below
{
displayName = "Road cone (Blue)";
class MarkerLights
{
class BlueBlinking
{
name = "zluty pozicni blik";
color[] = {0.11,0.11,0.99,1};
ambient[] = {0.099,0.069,0.017,1};
brightness = 0.01;
blinking = 1;
};
};
};
};

--- End code ---
Untested. Fiddle with color[] etc
Place that text in a config.cpp. Place that file in a folder called something like SPU_Lights, then run BinPBO on the folder to make you own PBO addon.

To do this without a addon? Sorry, dont know how. Ask in Mission Editing and Scripting instead if thats what you wanted.

Navigation

[0] Message Index

Go to full version