Modme Forums
Menu:

Lights activated with the Power.

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: greeNTheBoyz
Hey!

So, I believe this should be possible, but I have no idea how to go about it. I have volumetric lights in my map, and I would like it to have them all turn on when the power is activated. I has searched and couldn't find any answer, so I posted here. If it's also possible, i'd like it if FX appeared when the power was turned on as well, but my main priority is to get the lights working.







- Thanks, greeNTheBoyz


ModmeBot:

Reply By: TheLapper96
It is possible, but you somehow need to tell the power switch to change the lightstate, sadly I don't know how to script.


ModmeBot:

Reply By: authorjames
First find the sun_volume and make the second lightning state (ssi2) the same as the first lightning state (ss1), or something else if you want to change skybox upon power being turned on.



Edit the properties of the light and make sure they are all unmarked on LIGHTNING_STATES/lightningstate1, this will make it so all lights are turned off until we change the lightningstate to the second one.



Add this in the main function of your map's gsc file;



init_power();



Add this anywhere in your map's gsc file



function init_power()
{
	level flag::wait_till("power_on");
	level util::set_lighting_state(2);
}

Hopefully this will help you out!


ModmeBot:

Reply By: greeNTheBoyz
Thanks so much! If it was possible I knew it would have something to do with that sun volume, I just didn't know how to do it. Thanks again!

EDIT: I've tried this, and I always get this error when loading the map and testing it:







... and this is my 'zm_street.gsc' file:






ModmeBot:

Reply By: DTZxPorter

greeNTheBoyzThanks so much! If it was possible I knew it would have something to do with that sun volume, I just didn't know how to do it. Thanks again!

EDIT: I've tried this, and I always get this error when loading the map and testing it:







... and this is my 'zm_street.gsc' file:









Try level threading the call to init_power() so
level thread init_power();


ModmeBot:

Reply By: greeNTheBoyz

DTZxPorter
greeNTheBoyzThanks so much! If it was possible I knew it would have something to do with that sun volume, I just didn't know how to do it. Thanks again!

EDIT: I've tried this, and I always get this error when loading the map and testing it:







... and this is my 'zm_street.gsc' file:









Try level threading the call to init_power() so

level thread init_power();



Will do, cheers!


ModmeBot:

Reply By: Wraithislove
Can you guys help with getting perks to turn on after power too?



Edit- found out how, thanks!


ModmeBot:

Reply By: xTundra

WraithisloveCan you guys help with getting perks to turn on after power too?



Edit- found out how, thanks!


Mind sharing how you did it? Thanks.


ModmeBot:

Reply By: Wraithislove

xTundra
WraithisloveCan you guys help with getting perks to turn on after power too?



Edit- found out how, thanks!


Mind sharing how you did it? Thanks.


I stamped the jugs prefab then selected the lights and did what dtz did, lighting state1:on, other lighting states off. Hope this helps :D