Jump to content
Sign in to follow this  
sagarasousuke

Script Light brightness Change

Recommended Posts

In the class of the searchlight, the color of the light is set as follows.

  	class Reflectors
	{
		class main_reflector
		{
			color[] = {1, 1, 1, 1.0};
			ambient[] = {0.1, 0.1, 0.1, 1.0};
			position = "light";
			direction = "lightEnd";
			hitpoint = "light";
			selection = "light";
			sourceSize = 0.1;
			size = 0.1;
			[b][color="Red"]brightness = 1.0;[/color][/b]		};
	};

Can this be changed while playing a game executing the value of brightness with Script?

Please teach if you understand the way.

_light = "#lightpoint" createVehicleLocal pos; 

[b][color="red"]_light setLightBrightness 0.5; [/color][/b]

_light lightAttachObject [_object, [0,0,0]] 

Share this post


Link to post
Share on other sites

Nope. SetLightBrightness only works on script created 'lightpoint' objects. You can't manipulate vehicle Reflectors with script.

You could destroy the light on the searchlight and attach a lightpoint object to it, but it wouldn't have anywhere near the same effect. I don't think you can create directional light sources with script.

Edited by Big Dawg KS

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  

×