Jump to content
Sign in to follow this  
semedar

Create Light In The Sky (5000m)

Recommended Posts

I have a static C-130 with a height of 5000 where I para down to the town/target but I can't seem to place any lights up there. I've tried the gamelogic way as I always have but I can't get any lights up there. :confused:

Gamelogic Way:

Game logic init:

light = "#lightpoint" createVehicleLocal position this;
light setLightBrightness 0.2;
light setLightAmbient[0.0, 0.0, 0.0];
light setLightColor[0.2, 0.5, 0.3];
light lightAttachObject [this, [2,1,2]];
this setPos [getPos this select 0, getPos this select 1, [color="Red"]5000[/color]];

Anyone help me out? If possible, it would be awesome if it was either green or red and it blinks. But if it's impossible to blink, that's ok. :rolleyes:

Share this post


Link to post
Share on other sites

Set the brightness to 25 and give the ambient array some color value as well.

Edited by Celery

Share this post


Link to post
Share on other sites

Hah, that seems to have done it! Thanks. :)

Wonder why it needs to be so bright when it's bright enough at ground level. :confused:

---------- Post added at 02:52 PM ---------- Previous post was at 01:11 PM ----------

Ok, I'm trying to make the light blink and I tried creating a light, attaching it to the C130, detaching it, and attaching it to another object but I can't seem to get it to work.

_light = "#lightpoint" createVehicleLocal position C130;

while { true } do
{ 
_light setLightBrightness 25;
_light setLightAmbient[0.0, 0.0, 0.0];
_light setLightColor[0.2, 0.5, 0.3];
_light lightAttachObject [C130, [0,0,0]];
Sleep 3;
_light lightDetachObject [C130, [0,0,0]];
_light lightAttachObject [C130_Off, [0,0,0]];
};

When I try to just create a light it works:

_light = "#lightpoint" createVehicleLocal position C130;
_light setLightBrightness 25;
_light setLightAmbient[0.0, 0.0, 0.0];
_light setLightColor[0.2, 0.5, 0.3];
_light lightAttachObject [C130, [0,0,0]];

I've also tried to delete the light and creating it but can't seem to get that to work.

C130Light = true;

while { C130Light } do
{
_C130Light = "#lightpoint" createVehicle getPos C130;
_C130Light setLightBrightness 25;
_C130Light setLightAmbient[0.0, 0.0, 0.0];
_C130Light setLightColor[0.2, 0.5, 0.3];
_C130Light lightAttachObject [C130, [0,0,0]];
Sleep 3;
_C130Light lightDetachObject [C130, [0,0,0]];
deleteVehicle _C130Light;
}

Edited by Semedar

Share this post


Link to post
Share on other sites

Just tried it and didn't work.


_light = "#lightpoint" createVehicleLocal position C130;

while { true } do
{
_light setLightBrightness 25;
_light setLightAmbient[0.0, 0.0, 0.0];
_light setLightColor[0.2, 0.5, 0.3];
_light lightAttachObject [C130, [0,0,0]];
Sleep 3;
_light setLightBrightness 0;
};
[/Code]

Edit: I fixed it, it just needed another Sleep after setting the brightness to 0.

[Code]
_light = "#lightpoint" createVehicleLocal position C130;

while { true } do
{
_light setLightBrightness 25;
_light setLightAmbient[0.0, 0.0, 0.0];
_light setLightColor[0.2, 0.5, 0.3];
_light lightAttachObject [C130, [0,0,0]];
Sleep 1;
_light setLightBrightness 0;
Sleep 1;
};
[/Code]

Edited by Semedar

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  

×