OFPEC Forum
Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: Pilot 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:
#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?
-
Never Mind!
Sometimes I'm an idiot!
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:
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
-
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:
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?
-
Try this instead:
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
-
No, it didn't work.
Does the "Streetlamp" class allow for changes in color? Or is just the "Fire" class that allows it?
-
Sorry my mistake .......I really should pay more attention.
Try this:
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
-
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
-
Thank you for helping me again Planck! It works great now!
Topic Solved (Again)