Hi, I'm working on a new map and I'm having trouble using SetLightingState. Lighting states 1 and 2 are set to night, while I have lighting state 3 set to day. I'm trying to make the lighting state change to 3 with reckfullies shootable trigger script, but it doesn't seem to change. Could someone tell me how to set the map to lighting state 3 after all shootables are triggered?
Here is the code, the SetLightingState is towards the bottom.
Code Snippet
Plaintext
function init() { level.shootablesNeeded = 3; level.shootablesCollected = 0;
function shootables_done(player) { while(1) { self waittill(level.shootablesCollected >= level.shootablesNeeded);
if(level.shootablesCollected == level.shootablesNeeded) { // What ever code you want to execute once all shootables are collected IPrintLn("All Shootables Collected"); SetLightingState( 3 ); }
break; } }
If someone can come up with a solution, I will credit you when I release the map, thanks in advance.
Hi, I'm working on a new map and I'm having trouble using SetLightingState. Lighting states 1 and 2 are set to night, while I have lighting state 3 set to day. I'm trying to make the lighting state change to 3 with reckfullies shootable trigger script, but it doesn't seem to change. Could someone tell me how to set the map to lighting state 3 after all shootables are triggered?
Here is the code, the SetLightingState is towards the bottom.
Code Snippet
Plaintext
function init() { level.shootablesNeeded = 3; level.shootablesCollected = 0;
function shootables_done(player) { while(1) { self waittill(level.shootablesCollected >= level.shootablesNeeded);
if(level.shootablesCollected == level.shootablesNeeded) { // What ever code you want to execute once all shootables are collected IPrintLn("All Shootables Collected"); SetLightingState( 3 ); }
break; } }
If someone can come up with a solution, I will credit you when I release the map, thanks in advance.
The numbers for SetLightingState are messed up. I'm pretty sure 3 will set it to lighting state 2 so try using 4.