I'm trying to create runway lights using standart streetlamp [Omiscvo_stara.p3d]. I've copied this p3d to *****_lamp.p3d and put them (rescaled to 0%) on my island.
To get the light from them I create the config.cpp:
class CfgPatches
{
class lampe
{
units[] = {fonar,white_lamp, red_lamp, green_lamp, blue_lamp};
weapons[] = {};
requiredVersion = 1.91;
};
};
class CfgNonAIVehicles
{
class All {};
class Static: All {};
class StreetLamp: Static {};
class fonar: StreetLamp
{
model="fonarifonar";
scope=protected;
armorBulb = 1000;
displayName="fonar";
destrType=DestructTree;
simulation=StreetLamp;
vehicleClass=objects;
colorDiffuse[]={0.1,0.9,0.6};
colorAmbient[]={0.1,0.1,0.1};
size =0.02;
brightness = 0.25;
};
class white_lamp: StreetLamp
{
model="fonariwhite_lamp";
scope=protected;
armorBulb = 1000;
displayName="white_lamp";
destrType=DestructTree;
simulation=StreetLamp;
vehicleClass=objects;
colorDiffuse[]={0.1,0.9,0.6};
colorAmbient[]={0.7,0.7,1.0};
size =0.002;
brightness = 0.015;
};
class red_lamp: StreetLamp
{
model="fonarired_lamp";
scope=protected;
armorBulb = 1000;
displayName="red_lamp";
destrType=DestructTree;
simulation=StreetLamp;
vehicleClass=objects;
colorDiffuse[]={0.1,0.9,0.6};
colorAmbient[]={1.0,0.7,0.7};
size =0.02;
brightness = 0.015;
};
class green_lamp: StreetLamp
{
model="fonarigreen_lamp";
scope=protected;
armorBulb = 1000;
displayName="green_lamp";
destrType=DestructTree;
simulation=StreetLamp;
vehicleClass=objects;
colorDiffuse[]={0.1,0.9,0.6};
colorAmbient[]={1.0,0.7,0.7};
size =0.02;
brightness = 0.015;
};
class blue_lamp: StreetLamp
{
model="fonariblue_lamp";
scope=protected;
armorBulb = 1000;
displayName="blue_lamp";
destrType=DestructTree;
simulation=StreetLamp;
vehicleClass=objects;
colorDiffuse[]={0.7,0.7,1.0};
colorAmbient[]={0.7,0.7,1.0};
size =0.02;
brightness = 0.015;
};
};
But the light staying white. What I'm doing wrong?
1/2 OFF: How to create blue, red and green lamp?
Moderators: Lone Wolf, Snake Man
1/2 OFF: How to create blue, red and green lamp?
Last edited by Ezh083i on 1970-01-01 00:00:00, edited 1 time in total.
Read my post better...
Re: 1/2 OFF: How to create blue, red and green lam
For the green lamp try:
colorDiffuse[]={0,1,0};
colorAmbient[]={0,1,0};
For the red one:
colorDiffuse[]={1,0,0};
colorAmbient[]={1,0,0};
...and so on.
The values are [red,green,blue].
colorDiffuse[]={0,1,0};
colorAmbient[]={0,1,0};
For the red one:
colorDiffuse[]={1,0,0};
colorAmbient[]={1,0,0};
...and so on.
The values are [red,green,blue].
Re: 1/2 OFF: How to create blue, red and green lam
No effect with this lines... I guess that its impossible to create colored lights in this way. Only usingFor the green lamp try:
colorDiffuse[]={0,1,0};
colorAmbient[]={0,1,0};
For the red one:
colorDiffuse[]={1,0,0};
colorAmbient[]={1,0,0};
...and so on.
The values are [red,green,blue].
simulation "fire"...
Read my post better...
Re: 1/2 OFF: How to create blue, red and green lam
Thats right,
streetlights can change their 'cone color/brightness' or 'ambient color/brightness',
but may not change the 'flarecircle color/brightness' like simulation fire :-/
streetlights can change their 'cone color/brightness' or 'ambient color/brightness',
but may not change the 'flarecircle color/brightness' like simulation fire :-/
Re: 1/2 OFF: How to create blue, red and green lam
Sorry to drag up an old thread, but, I know the answer to this one.
You need to add a fourth parameter to colordiffuse and colorambient.
Instead of:
colorDiffuse[]={0.7,0.7,1.0};
colorAmbient[]={0.7,0.7,1.0};
Use
colorDiffuse[]={0.7,0.7,1.0,1.0};
colorAmbient[]={0.7,0.7,1.0,1.0};
Planck
You need to add a fourth parameter to colordiffuse and colorambient.
Instead of:
colorDiffuse[]={0.7,0.7,1.0};
colorAmbient[]={0.7,0.7,1.0};
Use
colorDiffuse[]={0.7,0.7,1.0,1.0};
colorAmbient[]={0.7,0.7,1.0,1.0};
Planck
- shinRaiden
- Captain
- Posts: 176
- Joined: 2004-02-27 18:29:53
- Contact:
Re: 1/2 OFF: How to create blue, red and green lam
Because the thread title should be
Thanks.Re: 1/2 OFF: How to create blue, red, green, and alpha lamp?
Who is online
Users browsing this forum: No registered users and 12 guests