Jump to content
Sign in to follow this  
Jayd33

Lifespan chem light

Recommended Posts

Hi;

I made a night mission with chemlights on the floor as bread crumbs to lead the people, but when playing after like 30-45mins it goes pitch black.

It's as the chemlights have gone out. So whats the lifespan of a chemlight ?

thx for a reply,

Jayd33

Share this post


Link to post
Share on other sites

Do you mean RL lifespan or in game?

Share this post


Link to post
Share on other sites

In game. It seems that they go out after some time.

Share this post


Link to post
Share on other sites

Seems like it's 15 minutes.

class Chemlight_green: SmokeShell
{
	model = "\A3\Weapons_f\chemlight\chemlight_green_lit";
	effectsSmoke = "ChemlightLight_green";
	timeToLive = 900;
};

Share this post


Link to post
Share on other sites

Ty Cuel, that will be alot of triggers then, when bluefor leaves the triggerarea, the chemlight will go out after 15mins.

Share this post


Link to post
Share on other sites

So where do you put that in order to lengthen their life? I feel like I missed something.

Share this post


Link to post
Share on other sites
So where do you put that in order to lengthen their life? I feel like I missed something.

I dont think there is. I've placed triggers around so when bluefor enters the trigger area when present the chemlight turns on.

I just hope it works like a swithc, after 15mins the chemlight goes out but when bluefor enters the area again or still present it turns on again.

Share this post


Link to post
Share on other sites

ahhh I see. That will probably work for my mission. I'm using mine to light up a supply drop but if someone joined in late they may miss it since the mission takes place at night. What cmd are you using for the trigger that controls the chem lights?

Share this post


Link to post
Share on other sites

_light = "Chemlight_green" createVehicle getPos triggername;

Share this post


Link to post
Share on other sites

Is there a function that can check if the chemlight is still alive, and if not add a new one?

Actually what I'd really like to do is create a new class of chemlight that has a massive timetolive value. That way I could use "static" chemlights as permanent scene lights e.g. for lighting a base. Then the regular chemlights could still be used by players. (I'd like to be able to do something similar with flares too).

Alternatively, is there a way for a script to alter the object's time-to-live value as and when it is called, so the scripted chemlights behave in the new way and the ones thrown by players behave in the default way?

Share this post


Link to post
Share on other sites
Is there a function that can check if the chemlight is still alive, and if not add a new one?

Actually what I'd really like to do is create a new class of chemlight that has a massive timetolive value. That way I could use "static" chemlights as permanent scene lights e.g. for lighting a base. Then the regular chemlights could still be used by players. (I'd like to be able to do something similar with flares too).

Alternatively, is there a way for a script to alter the object's time-to-live value as and when it is called, so the scripted chemlights behave in the new way and the ones thrown by players behave in the default way?

you need to make mod to overwrite classes

class Chemlight_green_long: Chemlight_green

{

timeToLive = 900000;

};

something like that?

to check if it is still alive you can use isNull

Share this post


Link to post
Share on other sites

The following should work:

_chemLight = createVehicle ["Chemlight_green", _somePosition, [], 0, "CAN_COLLIDE"];

waitUntil { isNull _chemLight };

hint "ChemLight has been deleted!";

Share this post


Link to post
Share on other sites

while {true} do
{
  _chemLight = "Chemlight_green" createVehicle (position LOGICNAME);
  sleep 900;
  deleteVehicle _chemLight;
};

This will create the chemlight at a game logic, then wait for 900 seconds (which is the duration the light lasts according to cuel's post), then it will delete the chemlight and make a new one. It will do this forever.

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  

×