Jump to content
Sign in to follow this  
iconoclastdx

Anyone know how to make a chemlight ignore gravity but still light?

Recommended Posts

In my hands, enableSimulation prevents chemlights from lighting. So placing the chemlight then freezing it with enableSimulation stops the chemlight from lighting. I need a way to keep the chemlight frozen at a xyz position and light there. The reason I want this is because objects fall tough the flooring of shacks which screws with the lighting. Right now Im using the following code inatrigger to place the chemlight and re-position it above the floor so it one can at lease see the chemlight object. However the lighting does not recalculate and looks bad. Plus I'm sure it will break in multiplayer. Any suggestions for setting the position of the chemlight before it calculates the lighting? Or force it to recalculate later ? Or some other workaround?

Trigger ON ACT.

objChemRed01 = "Chemlight_red" createVehicle [getPos tgrChem01 select 0, getPos tgrChem01 select 1,1]; 
0 = 0 spawn 
{
sleep 10; objChemRed01 enableSimulation false; 
objChemRed01 setPos [getPos objChemRed01 select 0, getPos objChemRed01 select 1, 0.2]
}

Share this post


Link to post
Share on other sites

Good suggestion. Thanks.

UPDATE

-----------------------------------

I got it to work. Here's the code placed in a trigger (tgrChem01) at the location I wanted the chem light.

objChemRed01 = "Chemlight_red" createVehicle [getPos tgrChem01 select 0, getPos tgrChem01 select 1,0.15]; objChemRed01 attachTo [objHeliChem01];

Turns out you dont need to offset in the attachTo. If you leave it blank it uses the chemlights createVehicle position. Thus, it doesn't matter where the helipad is.

Edited by IconoclastDX

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  

×