Hi guys I just did a bit change to the script that i found here:
cod4: Switches Primary light
Basically what i have done is just making that script working as a flicker light. That was pretty easy, but i can't get the light working.
I mean i can see the model swapping from com_studiolight_hanging_off to com_studiolight_hanging_on but when the shadow-caster brush move in order to cover the light just nothing happen . I tried to texture the brush with a concrete texture to see its correct behaviour on moving up and down and yes it is actually moving in the right way. My question is do i have to do some particular setting for a light? Also my gfx shadow option is turned on.
here my script:
Code:
main() {
precacheModel("com_studiolight_hanging_off");
thread flicker();
}
flicker(){
while (true){
speed = .01;
height = -36;
spotlight_hide = getent("spotlight_hide", "targetname");
spotlight_model = getent( "spotlight_model", "targetname");
if(isdefined(spotlight_model) && isdefined(spotlight_hide)){
wait(randomfloat(0.6));
spotlight_hide movez (height, speed);
spotlight_model setmodel( "com_studiolight_hanging_off");
spotlight_hide waittill ("movedone");
wait(randomfloat(0.4)); spotlight_hide movez (height - (height * 2), speed);
spotlight_model setmodel( "com_studiolight_hanging_on" );
spotlight_hide waittill ("movedone");
} else {
wait(6);
iprintlnbold ("Warning !!! - missing assets");
}
}
}
By the way my script has been tested and it is working good.
I bet i made a mistake on setting my light in cod4 radiant
Could you pls tell me what it's wrong?
Thanks a lot and sorry for my bad english as i am italian
edited on Aug. 26, 2009 12:21 pm by viper75