Jump to content
Sign in to follow this  
maxqubit

How do i make a simple light?

Recommended Posts

^topic^

I know about arma command lightAttachObject and tried the stuff which is given as an example. It shines allright but i don't see a dot of light!? It is as if the light comes out of nowwhere.

Anyone knows how to make a very simple light? Like a light bulb without the bulb:) Just a point/dot of shining light is all i want.

Tia

(if you are curious why i want this ... oh well, i just want to get those lights flying thru the skies ... you know, the ufo thingy:)

Share this post


Link to post
Share on other sites

You might not have set the offset right from the center of the object that you are attaching the light to. If the light is physically inside that object it might not really shine.

You have used these commands to create the light, right?

_light = "#lightpoint" createVehicle [_x,_y];

_light setLightBrightness .2;

_light setLightAmbient[1.0, 1.0, 0.9];

_light setLightColor[1.0, 1.0, 0.9];

_light lightAttachObject [_object, [0,-4,0]];

One thing i have noticed is that when you move an object with the velocity command that has a light attached, the light will stop shining after a certain distance, seems to be a bug.

You can of course also use particles, but they don't really seem to emit light, but in the distance for your UFOs it might be allright. Try it out with the koulesvetlo type and set the size to like [10,10,10].

Share this post


Link to post
Share on other sites
You might not have set the offset right from the center of the object that you are attaching the light to. If the light is physically inside that object it might not really shine.

You have used these commands to create the light, right?

_light = "#lightpoint" createVehicle [_x,_y];

_light setLightBrightness .2;

_light setLightAmbient[1.0, 1.0, 0.9];

_light setLightColor[1.0, 1.0, 0.9];

_light lightAttachObject [_object, [0,-4,0]];

One thing i have noticed is that when you move an object with the  velocity command that has a light attached, the light will stop shining after a certain distance, seems to be a bug.

Yeah i copy, paste and fiddled with that script:) But, you do something i think i didn't do, namely positioning the light just outside the object.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_light lightAttachObject [_object, [0,-4,0]];

What i DID was attaching it at the position of the object so

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_light lightAttachObject [__object, getpos _object]

... which could explain why it seemed strange. I will check again, for now, thx for the pointer!

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  

×