Home   Help Search Login Register  

Author Topic: Light Problem  (Read 1767 times)

0 Members and 1 Guest are viewing this topic.

Offline Pilot

  • Contributing Member
  • **
Light Problem
« on: 10 Dec 2004, 20:06:52 »
I am making two types of airport lights for an island I'm also making.  I have completed the modelling, binarized them, and written a config for them.  However, the light does not work.  I'm quite sure the problem is in my config.  Here it is:

Quote
#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7
#define true 1
#define false 0
#define private 0
#define protected 1
#define public 2

class CfgPatches
{
   class LarsenOBJ
   {
        worlds[] = {};
      units[] = {Tower, Apartment, Radar, BrickPath, ParkingLot, Shops, GrassBurm, DesertBurm, bluelight, whitelight};
        requiredVersion = 1.85;
   };
};
class cfgModels
{
  class Default
    {
          sections[]={""};
          sectionsInherit="";
    };
  class All {};
      class Static: All {};
      class Building: Static {};
      class NonStrategic: Building  {};
  class TowerBalcony : NonStrategic
  {
          sectionsInherit="";
      sections[]={"beacon"};
  };
  class Apartment : NonStrategic {};
  class Radar : NonStrategic
  {
          sectionsInherit="";
      sections[]={"radar"};
  };
  class BrickPath : NonStrategic {};
  class ParkingLot : NonStrategic {};
  class Shops : NonStrategic {};
  class GrassBurm: NonStrategic {};
  class DesertBurm: NonStrategic {};
  class bluelight: NonStrategic
  {
      sectionInherit="light";
      sections[]={};
   };
  class whitelight: NonStrategic
  {
      sectionInherit="light";
      sections[]={};
   };
};
class CfgVehicles
{
   class All{};
   class Static: All{};
   class Building: Static{};
   class NonStrategic: Building{};

   class Tower: NonStrategic
   {
      model="\LarsenOBJ\TowerBalcony.p3d";
      armor=1000;
      scope=2;  
      displayName="Tower";
      vehicleClass="Tom's Stuff";
      ladders[]={{"start","end"},{"start1","end1"}};
      animated=1;
      class Animations
      {
         class ani_beacon
         {
            angle0=0;
            angle1="-15384 * 3.141592654";
            multiplyer=20;
            type="rotation";
            animperiod=100000;
            selection="beacon";
            axis="beacon_axis"
         };
      };
      class eventhandlers
      {
         init="(_this select 0) animate [""ani_beacon"", 1]";
      };
   };
   class Apartment: NonStrategic
   {
      model="\LarsenOBJ\Apartment.p3d";
      armor=1500;
      scope=2;      
      displayName="Apartment";
      vehicleClass="Tom's Stuff";
   };        
   class Radar: NonStrategic
   {
      model="\LarsenOBJ\Radar.p3d";
      armor=300;
      scope=2;    
      displayName="Radar";
      vehicleClass="Tom's Stuff";
      animated=1;
      class Animations
      {
         class ani_radar
         {
            angle0=0;
            angle1="-30000 * 3.141592654";
            multiplyer=20;
            type="rotation";
            animperiod=100000;
            selection="radar";
            axis="radar_axis"
         };
      };
      class eventhandlers
      {
         init="(_this select 0) animate [""ani_radar"", 1]";
      };
   };      
   class BrickPath: NonStrategic
   {
      model="\LarsenOBJ\BrickPath.p3d";
      scope=2;      
      displayName="Brick Path";
      vehicleClass="Tom's Stuff";
   };        
   class ParkingLot: NonStrategic
   {
      model="\LarsenOBJ\ParkingLot.p3d";
      scope=2;      
      displayName="Parking Lot";
      vehicleClass="Tom's Stuff";
   };        
   class Shops: NonStrategic
   {
      model="\LarsenOBJ\Building.p3d";
      scope=2;      
      displayName="Building";
      vehicleClass="Tom's Stuff";
   };
   class GrassBurm: NonStrategic
   {
      model="\LarsenOBJ\GrassBurm.p3d";
      armor=999999;
      scope=2;      
      displayName="Grass Burm";
      vehicleClass="Tom's Stuff";
   };
   class DesertBurm: NonStrategic
   {
      model="\LarsenOBJ\DesertBurm.p3d";
      armor=999999;
      scope=2;      
      displayName="Desert Burm";
      vehicleClass="Tom's Stuff";
   };
};
class CfgNonAIVehicles
{
   class Streetlamp{};

   class bluelight: Streetlamp
   {
      scope=protected;
      model = "bluelight.p3d";
      destrType=DestructTree;
      simulation=StreetLamp;
      colorDiffuse[] = {0.1, 0.1, 1};
      colorAmbient[] = {0.1, 0.1, 0.1};
      brightness = .3;
      armorBulb = 1;
   };
   class whitelight: Streetlamp
   {   
      scope=protected;
      model = "whitelight.p3d";
      destrType=DestructTree;
      simulation=StreetLamp;
      colorDiffuse[] = {1, 1, 1};
      colorAmbient[] = {0.1,0.1,0.1};
      brightness = .3;
      armorBulb = 1;
   };
};

What's wrong with it?

Offline Pilot

  • Contributing Member
  • **
Re:Light Problem
« Reply #1 on: 10 Dec 2004, 20:27:27 »
Never Mind!

Sometimes I'm an idiot!

Quote
class bluelight: Streetlamp
   {
      scope=protected;
      model = "bluelight.p3d";
      destrType=DestructTree;
      simulation=StreetLamp;
      colorDiffuse[] = {0.1, 0.1, 1};
      colorAmbient[] = {0.1, 0.1, 0.1};
      brightness = .3;
      armorBulb = 1;
   };
   class whitelight: Streetlamp
   {  
      scope=protected;
      model = "whitelight.p3d";
      destrType=DestructTree;
      simulation=StreetLamp;
      colorDiffuse[] = {1, 1, 1};
      colorAmbient[] = {0.1,0.1,0.1};
      brightness = .3;
      armorBulb = 1;
   };
};

Should Be:

Quote
class bluelight: Streetlamp
   {
      scope=protected;
      model = "LarsenOBJ\bluelight.p3d";
      destrType=DestructTree;
      simulation=StreetLamp;
      colorDiffuse[] = {0.1, 0.1, 1};
      colorAmbient[] = {0.1, 0.1, 0.1};
      brightness = .3;
      armorBulb = 1;
   };
   class whitelight: Streetlamp
   {  
      scope=protected;
      model = "LarsenOBJ\whitelight.p3d";
      destrType=DestructTree;
      simulation=StreetLamp;
      colorDiffuse[] = {1, 1, 1};
      colorAmbient[] = {0.1,0.1,0.1};
      brightness = .3;
      armorBulb = 1;
   };
};

I forgot to include the name of my pbo in the "model" section.

Topic Solved

Offline Pilot

  • Contributing Member
  • **
Re:Light Problem
« Reply #2 on: 10 Dec 2004, 20:59:37 »
Ok, I have to unslove this topic, as I have another problem. ::)

I am trying to make two different lights, blue and white.

The white light works fine.
My blue light shows up with a white light.

Here are my settings:
Quote
class CfgNonAIVehicles
{
   class Streetlamp{};

   class bluelight: Streetlamp
   {
      scope=protected;
      model = "\LarsenOBJ\bluelight.p3d";
      destrType=DestructTree;
      simulation=StreetLamp;
      color[] = {0, 0, 1};
      Ambient[] = {0, 0, .02};
      brightness = .07;
      armorBulb = .5;
   };
   class whitelight: Streetlamp
   {   
      scope=protected;
      model = "\LarsenOBJ\whitelight.p3d";
      destrType=DestructTree;
      simulation=StreetLamp;
      color[] = {1, 1, 1};
      Ambient[] = {0.02, 0.02, 0.02};
      brightness = .07;
      armorBulb = .5;
   };
};

I have tried achanging "color" and "ambient", to no effect.  What do I have to do to get a blue light?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Light Problem
« Reply #3 on: 10 Dec 2004, 21:17:48 »
Try this instead:

Code: [Select]
class CfgNonAIVehicles
{
   class Streetlamp{};

   class bluelight: Streetlamp
   {
      scope=protected;
      model = "\LarsenOBJ\bluelight.p3d";
      destrType=DestructTree;
      simulation=StreetLamp;
      color[] = {0, 0, 1};
      Ambient[] = {0, 0, .02, 0.0};
      brightness = .07;
      armorBulb = .5;
   };
   class whitelight: Streetlamp
   {  
      scope=protected;
      model = "\LarsenOBJ\whitelight.p3d";
      destrType=DestructTree;
      simulation=StreetLamp;
      color[] = {1, 1, 1};
      Ambient[] = {0.02, 0.02, 0.02, 0.0};
      brightness = .07;
      armorBulb = .5;
   };
};


Planck
I know a little about a lot, and a lot about a little.

Offline Pilot

  • Contributing Member
  • **
Re:Light Problem
« Reply #4 on: 10 Dec 2004, 21:38:31 »
No, it didn't work.

Does the "Streetlamp" class allow for changes in color?  Or is just the "Fire" class that allows it?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Light Problem
« Reply #5 on: 10 Dec 2004, 22:20:07 »
Sorry my mistake .......I really should pay more attention.

Try this:

Code: [Select]

class CfgNonAIVehicles
{
  class Streetlamp{};

  class bluelight: Streetlamp
  {
      scope=protected;
      model = "\LarsenOBJ\bluelight.p3d";
      destrType=DestructTree;
      simulation=StreetLamp;
      colorDiffuse[] = {0, 0, 1, 0};
      colorAmbient[] = {0, 0, .02, 0.0};
      brightness = .07;
      armorBulb = .5;
  };
  class whitelight: Streetlamp
  {
      scope=protected;
      model = "\LarsenOBJ\whitelight.p3d";
      destrType=DestructTree;
      simulation=StreetLamp;
      colorDiffuse[] = {1, 1, 1, 0};
      colorAmbient[] = {0.02, 0.02, 0.02, 0.0};
      brightness = .07;
      armorBulb = .5;
  };
};

Once again sorry.............. I forgot the color[] bit.
Also.......class Streetlamp doesn't use color[] and Ambient[]........it uses colordiffuse and colorambient

Hope it works ok this time



Planck
« Last Edit: 10 Dec 2004, 22:21:29 by Planck »
I know a little about a lot, and a lot about a little.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Light Problem
« Reply #6 on: 11 Dec 2004, 00:23:36 »

Quote
Does the "Streetlamp" class allow for changes in color?

Yes it is possible to change the colours for class streetlamp, I have done it many times.

Look at the picture .....link at the bottom.

Although, there is still the problem of the light cone when using elevated runway lamps.
I haven't been able to eliminate it at all.


Planck
I know a little about a lot, and a lot about a little.

Offline Pilot

  • Contributing Member
  • **
Re:Light Problem
« Reply #7 on: 11 Dec 2004, 15:31:15 »
Thank you for helping me again Planck!  It works great now!

Topic Solved (Again)