Jump to content
Sign in to follow this  
frezinator

Is there any light source besides fireplace and burning barrels???

Recommended Posts

Anyone know how to add light source for night missions besides burning fireplace and burning barrels?

Share this post


Link to post
Share on other sites

Yes I have a script that can give you a good light source.

---------- Post added at 13:23 ---------- Previous post was at 13:21 ----------

Yes I have a script that allows runway lights and towers to put out a very good Light source. If you can't find it I will post it later today for you

AVIBIRD.

Edited by AVIBIRD 1

Share this post


Link to post
Share on other sites

In the editor, place a "Tent US" (objects military).

Add this to the init field of the tent to make it indestructible:

this addEventHandler ["HandleDamage", {false}];

Now place a "Baseball" (objects small) in the center of the tent and name it "lamp1".

Add this to the init field of the baseball to make it indestructible, set its height and execute the script that will give it light:

this addEventHandler ["HandleDamage", {false}]; this setPos [getPos this select 0, getPos this select 1, 2]; null = [this] execVM "lamps.sqf";

Create a new script file called "lamps.sqf" and add this to it:

_light1 = "#lightpoint" createVehicle getpos lamp1; 
_light1 setLightBrightness 0.0028; 
_light1 setLightAmbient[37, 44, 41]; 
_light1 setLightColor[37, 44, 41]; 
_light1 lightAttachObject [lamp1, [0,0,0]];

Now test the mission and you will see a that the tent now has a lamp inside it. The lamp color is slightly greenish so it makes the tent look nicer.

A normal white lamp would look more like:

_light1 = "#lightpoint" createVehicle getpos lamp1; 
_light1 setLightBrightness 0.0028; 
_light1 setLightAmbient[50, 45, 35]; 
_light1 setLightColor[50, 45, 35]; 
_light1 lightAttachObject [lamp1, [0,0,0]];

Or a pinkish lamp:

_light1 = "#lightpoint" createVehicle getpos lamp1; 
_light1 setLightBrightness 0.0028; 
_light1 setLightAmbient[64, 23, 23]; 
_light1 setLightColor[64, 23, 23]; 
_light1 lightAttachObject [lamp1, [0,0,0]];

You can add many lights to your base area in many tents or whatever you want and run them all from the "lamps.sqf" script.

Remember when using a "#lightpoint" in your mission to light things like tents - that if there is anything burning near by, it will cause the "#lightpoint" to turn off or flicker and look bad. So if you place a fireplace or burning barrels near your "#lightpoint", it will conflict. This will also happen if there is a burning vehicle near by. I have seen this problem occur when using a campfire in my base that was more than 25 meters from my "#lightpoint". It's probably best to remove all fireplace or burning barrels from your base to be safe.

For a "Vehicle Service Point" helipad at base you can add a flashing red light by doing this:

Name your helipad "Hlight" and add this to its init field:

null = [this] execVM "scripts\flashing_H_light.sqf";

flashing_H_light.sqf

_light2 = "#lightpoint" createVehicle getpos Hlight; 
_light2 setLightBrightness 0.0028;
_light2 setLightAmbient[64, 23, 23]; 
_light2 setLightColor[64, 23, 23]; 
_light2 lightAttachObject [Hlight, [0,0,1]];

if (isServer) then 
{
   while {true} do
{
    _light2 setLightBrightness 0.0028;
    sleep 1;
    _light2 setLightBrightness 0; 
    sleep 1;
   	};
};

The helipad light will actually be under ground 1 meter, but it lights up nicely.

Edited by A-SUICIDAL

Share this post


Link to post
Share on other sites
In the editor, place a "Tent US" (objects military).

Add this to the init field of the tent to make it indestructible:

this addEventHandler ["HandleDamage", {false}];

Now place a "Baseball" (objects small) in the center of the tent and name it "lamp1".

Add this to the init field of the baseball to make it indestructible, set its height and execute the script that will give it light:

this addEventHandler ["HandleDamage", {false}]; this setPos [getPos this select 0, getPos this select 1, 2]; null = [this] execVM "lamps.sqf";

Create a new script file called "lamps.sqf" and add this to it:

_light1 = "#lightpoint" createVehicle getpos lamp1; 
_light1 setLightBrightness 0.0028; 
_light1 setLightAmbient[37, 44, 41]; 
_light1 setLightColor[37, 44, 41]; 
_light1 lightAttachObject [lamp1, [0,0,0]];

Now test the mission and you will see a that the tent now has a lamp inside it. The lamp color is slightly greenish so it makes the tent look nicer.

A normal white lamp would look more like:

_light1 = "#lightpoint" createVehicle getpos lamp1; 
_light1 setLightBrightness 0.0028; 
_light1 setLightAmbient[50, 45, 35]; 
_light1 setLightColor[50, 45, 35]; 
_light1 lightAttachObject [lamp1, [0,0,0]];

Or a pinkish lamp:

_light1 = "#lightpoint" createVehicle getpos lamp1; 
_light1 setLightBrightness 0.0028; 
_light1 setLightAmbient[64, 23, 23]; 
_light1 setLightColor[64, 23, 23]; 
_light1 lightAttachObject [lamp1, [0,0,0]];

You can add many lights to your base area in many tents or whatever you want and run them all from the "lamps.sqf" script.

Remember when using a "#lightpoint" in your mission to light things like tents - that if there is anything burning near by, it will cause the "#lightpoint" to turn off or flicker and look bad. So if you place a fireplace or burning barrels near your "#lightpoint", it will conflict. This will also happen if there is a burning vehicle near by. I have seen this problem occur when using a campfire in my base that was more than 25 meters from my "#lightpoint". It's probably best to remove all fireplace or burning barrels from your base to be safe.

For a "Vehicle Service Point" helipad at base you can add a flashing red light by doing this:

Name your helipad "Hlight" and add this to its init field:

null = [this] execVM "scripts\flashing_H_light.sqf";

flashing_H_light.sqf

_light2 = "#lightpoint" createVehicle getpos Hlight; 
_light2 setLightBrightness 0.0028;
_light2 setLightAmbient[64, 23, 23]; 
_light2 setLightColor[64, 23, 23]; 
_light2 lightAttachObject [Hlight, [0,0,1]];

if (isServer) then 
{
   while {true} do
{
    _light2 setLightBrightness 0.0028;
    sleep 1;
    _light2 setLightBrightness 0; 
    sleep 1;
   	};
};

The helipad light will actually be under ground 1 meter, but it lights up nicely.

Thank you so much!!!!!!!!!!!!!!!! This is really cool lights!!!! it feels like im in a night club lol!

One more thing, How do I add more flashing lights? what and where do I put in flashing_H_light.sqf ?

Also, how do I make the it color green or blue?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×