Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds
Watch MODSonair

Members Online

»
0 Active | 43 Guests
Online:

LATEST FORUM THREADS

»
Alive
MODSonline
mp_harbor_bas
CoDUO Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 MP Mapping
CoD 2 mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: Flickering lighting effects?????how??
Puncster
General Member
Since: Oct 30, 2004
Posts: 32
Last: Aug 5, 2008
[view latest posts]
Level 2
Category: CoD2 MP Mapping
Posted: Monday, Jan. 1, 2007 09:55 am
Could anyone tell me how to make lights flicker?I remember just about in sof2 you had to selcet the entity window and add some extra bits in there cant remember exactly what is it the same priciple in cod2? if so could someone add the correct entity info to get a light to flicker.I want to add several hanging light bulbs in a maps and want them to apear to be flickering.
Share |
Pedro699
General Member
Since: Jun 19, 2006
Posts: 781
Last: Dec 18, 2010
[view latest posts]
Level 7
Category: CoD2 MP Mapping
Posted: Monday, Jan. 1, 2007 10:37 am
If you are taking about changing, or dynamic lighting, take a look at the duhoc single player mission .gsc. If I remember correctly there were flickering lights in the bunkers of that mission. Note though that they only work in DX9.
Share |
CabooseKid
General Member
Since: Mar 1, 2005
Posts: 5
Last: Apr 11, 2007
[view latest posts]
Level 0
Category: CoD2 MP Mapping
Posted: Tuesday, Apr. 10, 2007 11:40 pm
Trying to do the same thing and I can't seem to find the are where the effect is scripted. Can someone give me a pointer to it?
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD2 MP Mapping
Posted: Wednesday, Apr. 11, 2007 10:00 am
Have you looked around in the duhoc SP scripts? It should be in there.
Share |
CabooseKid
General Member
Since: Mar 1, 2005
Posts: 5
Last: Apr 11, 2007
[view latest posts]
Level 0
Category: CoD2 MP Mapping
Posted: Wednesday, Apr. 11, 2007 04:36 pm
ok found the script thread that controls the flicker, here it is:

atmosphere_lights_flicker()
{

if (getcvarint("r_fullbright") > 0)
return;

if ( (isdefined(self.script_noteworthy)) && (self.script_noteworthy == "noflicker") )
return;

if (isdefined(level.lightsFlickering))
return;
level.lightsFlickering = true;

flicker = newHudElem();
flicker.x = 0;
flicker.y = 0;
flicker setshader ("overlay_lights_out", 640, 480);
flicker.alignX = "left";
flicker.alignY = "top";
flicker.horzAlign = "fullscreen";
flicker.vertAlign = "fullscreen";
flicker.alpha = 0;

wait 0.05;

//-----------------------------
//--------FLICKER LOGIC--------
//-----------------------------

count = (level.lightflicker["minFlickers"] + (level.lightflicker["maxFlickers"] - level.lightflicker["minFlickers"]) );
for (i=0;i {
if (i==0)
{
time = (0.1 + randomfloat(.25));
flicker fadeOverTime(time);
flicker.alpha = level.lightflicker["maxDarkness"];
wait time;
wait (randomfloatrange(level.lightflicker["minDarknessTime"], level.lightflicker["maxDarknessTime"]));
flicker fadeOverTime(time);
flicker.alpha = 0;
wait time;
}
else
{
time = (0.05 + randomfloat(.15));
flicker fadeOverTime(time);
flicker.alpha = randomfloatrange(level.lightflicker["minDarkness"], level.lightflicker["maxDarkness"]);

wait(randomfloat(time));
//wait time;

//wait (randomfloatrange(level.lightflicker["minDarknessTime"], level.lightflicker["maxDarknessTime"]));

time = (0.05 + randomfloat(.15));
flicker fadeOverTime(time);
flicker.alpha = 0;

wait(randomfloat(time));
}
wait (randomfloatrange(level.lightflicker["minDarknessPause"], level.lightflicker["maxDarknessPause"]));
}

//-----------------------------
//-----------------------------
//-----------------------------

flicker destroy();
level.lightsFlickering = undefined;
}



now how to cram that into an mp map and make it work?
Share |
Restricted Access Restricted Access subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 MP Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»