1/2 OFF: How to create blue, red and green lamp?

WrpTool island creator utility

Moderators: Lone Wolf, Snake Man

Post Reply
Ezh083i
Newbie
Posts: 8
Joined: 2004-03-30 02:31:45

1/2 OFF: How to create blue, red and green lamp?

Post by Ezh083i » 2004-04-09 11:06:56

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?
Last edited by Ezh083i on 1970-01-01 00:00:00, edited 1 time in total.
Read my post better...

Otto
Newbie
Posts: 7
Joined: 2004-04-04 19:14:10

Re: 1/2 OFF: How to create blue, red and green lam

Post by Otto » 2004-04-09 13:35:16

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].

Ezh083i
Newbie
Posts: 8
Joined: 2004-03-30 02:31:45

Re: 1/2 OFF: How to create blue, red and green lam

Post by Ezh083i » 2004-04-09 23:40:15

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].
No effect with this lines... I guess that its impossible to create colored lights in this way. Only using
simulation "fire"... :(
Read my post better...

User avatar
Lester
Recruit
Posts: 16
Joined: 2003-07-04 19:31:07
Contact:

Re: 1/2 OFF: How to create blue, red and green lam

Post by Lester » 2004-04-10 02:06:40

Thats right,
streetlights can change their 'cone color/brightness' or 'ambient color/brightness',
but may not change the 'flarecircle color/brightness' like simulation fire :-/

Planck
Recruit
Posts: 18
Joined: 2004-09-12 02:32:13

Re: 1/2 OFF: How to create blue, red and green lam

Post by Planck » 2004-09-11 22:54:22

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

User avatar
shinRaiden
Captain
Posts: 176
Joined: 2004-02-27 18:29:53
Contact:

Re: 1/2 OFF: How to create blue, red and green lam

Post by shinRaiden » 2004-09-12 03:33:45

Because the thread title should be
Re: 1/2 OFF: How to create blue, red, green, and alpha lamp?
Thanks.

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests