Jump to content
Sign in to follow this  
Ghostwolf

How do I make a an object emit more light?

Recommended Posts

I have a lit construction cone that flashes light, is there any scripting i can give the item for it to emit a stronger pulse of light?

Share this post


Link to post
Share on other sites

You can create a new lightsource on the cone.

_light1 = "#lightpoint" createVehicle position _object;
_light1 setLightBrightness 0.6;
_light1 setLightAmbient[0.99, 0.99, 0.74];
_light1 setLightColor[0.0, 0.0, 0.0];
_light1 lightAttachObject [_object, [0,1.65,1]];

Share this post


Link to post
Share on other sites
You can create a new lightsource on the cone.

_light1 = "#lightpoint" createVehicle position _object;
_light1 setLightBrightness 0.6;
_light1 setLightAmbient[0.99, 0.99, 0.74];
_light1 setLightColor[0.0, 0.0, 0.0];
_light1 lightAttachObject [_object, [0,1.65,1]];

so would i type this into the cones initialization section?

Share this post


Link to post
Share on other sites

You could, try this:

_light1 = "#lightpoint" createVehicle position this;
_light1 setLightBrightness 0.6;
_light1 setLightAmbient[0.99, 0.99, 0.74];
_light1 setLightColor[0.0, 0.0, 0.0];
_light1 lightAttachObject [this, [0,1.65,1]]; 

Share this post


Link to post
Share on other sites
You could, try this:

_light1 = "#lightpoint" createVehicle position this;
_light1 setLightBrightness 0.6;
_light1 setLightAmbient[0.99, 0.99, 0.74];
_light1 setLightColor[0.0, 0.0, 0.0];
_light1 lightAttachObject [this, [0,1.65,1]]; 

I got "local variable in global space" and nothing happend.

Edited by Ghostwolf

Share this post


Link to post
Share on other sites

Yeah, you'll have to execVM it.

//Put this in INIT of cone/object >> null = [this] execVM "lights.sqf";
//Then make a file called "lights.sqf" in your mission folder and paste this text.

_point = _this select 0;

_light1 = "#lightpoint" createVehicle position _point;
_light1 setLightBrightness 0.6;
_light1 setLightAmbient[0.99, 0.99, 0.74];
_light1 setLightColor[0.0, 0.0, 0.0];
_light1 lightAttachObject [_point, [0,0,0]]; 

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  

×