Jump to content
Sign in to follow this  
cheesus

lights made with createVehicle broken?

Recommended Posts

I havent had to post here previously as I can normaly find answers by searching, but after experimenting with adding lights into missions and saving/loading part way through a mission things go dark. I need to know if this is bug or feature.

Say your creating some lighting to set the mood with arma2's lights of many colours. Lets say your running this purloined script from a suitably placed units init:

//////////////////////////////////////////////////////////////////
// Function file for Armed Assault
// Created by: 1ID-CPL. Venori
//////////////////////////////////////////////////////////////////

_target = _this select 0;

// Create a small local light and attach it to the object.
_light = "#lightpoint" createVehicle [0,0,0];
_light setLightBrightness 0.3;
_light setLightAmbient[0.6, .07, .05];
_light setLightColor[0.6, .07, .05];
_light lightAttachObject [_target, [0,-0.1,0]];

Now, for example, you start fighting some bad guys and things get a little dicey and you get killed. Luckily you saved the game before hand so you load up the savegame and...doink! its lights out sucker. Those lights you created are gone - ruining your girlfriends mood completely.

This does not happen on units with lights already attached (vehicles, roadcones etc) so what gives? More importantly is there a way round arma2 turing off my lights?

I have noticed other strange things happening after loading up saved games, mainly ai behaviour but nothing as extreme as removing mission entities. Please help forum dudes.

Share this post


Link to post
Share on other sites

Speaking of work arounds & short of any better ideas I've stuck the script in a loop which will bring back the lights after a savegame.

_target = _this select 0;

while {alive player} do {

// Create a small local light and attach it to the object.
_light = "#lightpoint" createVehicle [0,0,0];
_light setLightBrightness 0.07;
_light setLightAmbient[1, .07, .05];
_light setLightColor[1, .07, .05];
_light lightAttachObject [_target, [0,-0.1,0]];

sleep 30;
deleteVehicle _light;

};

this does not seem like an elegant solution having to run this on each light so if anyones got a better idea...:)

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  

×