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

Members Online

»
0 Active | 63 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP 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 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: FX scripting Problem
Altheim
General Member
Since: Oct 13, 2005
Posts: 29
Last: Mar 15, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Wednesday, Nov. 22, 2006 06:16 am
My .gsc is:

main()
{
maps\mp\_load::main();
maps\mp\mp_clanfight_beta_fx::main();


// set fog. density, red, green, blue, alpha
//setCullFog (0, 16500, 0.7, 0.85, 1.0, 0);
setExpFog(0.00015, 0.7, 0.85, 1.0, 0);


// set background ambient noise
ambientPlay("ambient_mp_clanfight_beta");


//set building fire fx
maps\mp\buildingfx::main();


// set the way allies and axis look
// possible values are:
// for american: normandy
// for british: normandy, africa
// for russian: coats, padded
// for german: normandy, africa, winterlight, winterdark
game["american_soldiertype"] = "normandy";
game["german_soldiertype"] = "normandy";

// set up bloom and sky bleeding effects
//setCvar("r_glowbloomintensity0", ".25");
//setCvar("r_glowbloomintensity1", ".25");
//setcvar("r_glowskybleedintensity0",".3");
}

My fx .gsc is:

main()
{
precacheFX();
ambientFX();

}

precacheFX()
{

level._effect["fire"] = loadfx ("fx/fire/tiger_fire_turret_large.efx");
level._effect["smoke"] = loadfx ("fx/smoke/damaged_vehicle_smoke.efx");
level._effect["smoke"] = loadfx ("fx/smoke/thin_black_smoke_m.efx");
level._effect["sound"] = loadfx
("fx/soundfx/medfire.efx");


}

ambientFX()
{
// tank smoke fx
maps\mp\_fx::loopfx("smoke", (5223,3866,120), .1);
maps\mp\_fx::loopfx("smoke", (11127,3888,100), .1);
maps\mp\_fx::loopfx("smoke", (8340,-3296,129), .1);
maps\mp\_fx::loopfx("smoke", (-5473,-3296,129), .1);
maps\mp\_fx::loopfx("smoke", (544,-5474,171), .1);
maps\mp\_fx::loopfx("smoke", (11264,-2696,120), .1);
maps\mp\_fx::loopfx("smoke", (10577,-1890,120), .1);

// tank fire fx
maps\mp\_fx::loopfx("fire", (5223,3866,144), .6);
maps\mp\_fx::loopfx("fire", (8340,-3296,129), .6);
maps\mp\_fx::loopfx("fire", (11127,3888,120), .6);
maps\mp\_fx::loopfx("fire", (11264,-2696,100), .1);
maps\mp\_fx::loopfx("fire", (10577,-1890,130), .1);

// jeep smoke fx
maps\mp\_fx::loopfx("smoke", (11341,3980,8), .6);
maps\mp\_fx::loopfx("smoke", (12273,-2692,50), .6);
maps\mp\_fx::loopfx("smoke", (12470,-2646,50), .6);

// sounds fx
maps\mp\_fx::soundfx("medfire", (5236,3792,32));
maps\mp\_fx::soundfx("medfire", (8340,-3296,9), .2);
maps\mp\_fx::soundfx("medfire", (11127,3888,12), .2);
maps\mp\_fx::soundfx("medfire", (11264,-2696,13), .1);
maps\mp\_fx::soundfx("medfire", (10531,-1872,26), .1);



}

My buildingfx.gsc is:

main()
{

level._effect["fire"] = loadfx
("fx/fire/building_fire_large.efx");
maps\mp\_fx::loopfx("fire", (-3708,-1301,179), .1);
maps\mp\_fx::loopfx("fire", (-3782,2459,188), .1);

}

The problem I have is all works in the main fx file but when I add the sub file all my turret fires turn into building fires. I can't figure out how to segregate or combine the two and still have everything work. I have tried it several ways but scripting is new to me and I can't get it working. How is it that the engine knows what smoke and fire to put where until I add the structure fires. Thanks in advance for any help! Alt

edited on Nov. 22, 2006 01:21 am by Altheim
Share |
KillerKlown75
General Member
Since: Sep 27, 2006
Posts: 39
Last: Jan 31, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Wednesday, Nov. 22, 2006 11:13 am
I'm not an expert either, but it may be because you are declaring both your turret and building fires with the same name. It also looks like you have done the same with your smoke as well...

I've combined your fx into one script, although you may have to tweak the smoke settings (as I've assumed that damaged_vehicle_smoke is intended for the tanks and thin_black_smoke_m is for the jeeps). You will see that they are now named smoke1 and smoke2.






main()
{
precacheFX();
ambientFX();

}

precacheFX()
{

level._effect["fire"] = loadfx "fx/fire/tiger_fire_turret_large.efx");
level._effect["buildingfire"] = loadfx("fx/fire/building_fire_large.efx");
level._effect["smoke1"] = loadfx ("fx/smoke/damaged_vehicle_smoke.efx");
level._effect["smoke2"] = loadfx ("fx/smoke/thin_black_smoke_m.efx");
level._effect["sound"] = loadfx ("fx/soundfx/medfire.efx");




}

ambientFX()
{
// tank smoke fx
maps\mp\_fx::loopfx("smoke1", (5223,3866,120), .1);
maps\mp\_fx::loopfx("smoke1", (11127,3888,100), .1);
maps\mp\_fx::loopfx("smoke1", (8340,-3296,129), .1);
maps\mp\_fx::loopfx("smoke1", (-5473,-3296,129), .1);
maps\mp\_fx::loopfx("smoke1", (544,-5474,171), .1);
maps\mp\_fx::loopfx("smoke1", (11264,-2696,120), .1);
maps\mp\_fx::loopfx("smoke1", (10577,-1890,120), .1);

// tank fire fx
maps\mp\_fx::loopfx("fire", (5223,3866,144), .6);
maps\mp\_fx::loopfx("fire", (8340,-3296,129), .6);
maps\mp\_fx::loopfx("fire", (11127,3888,120), .6);
maps\mp\_fx::loopfx("fire", (11264,-2696,100), .1);
maps\mp\_fx::loopfx("fire", (10577,-1890,130), .1);

// jeep smoke fx
maps\mp\_fx::loopfx("smoke2", (11341,3980,8), .6);
maps\mp\_fx::loopfx("smoke2", (12273,-2692,50), .6);
maps\mp\_fx::loopfx("smoke2", (12470,-2646,50), .6);

//building fire
maps\mp\_fx::loopfx("buildingfire", (-3708,-1301,179), .1);
maps\mp\_fx::loopfx("buildingfire", (-3782,2459,188), .1);

// sounds fx
maps\mp\_fx::soundfx("medfire", (5236,3792,32));
maps\mp\_fx::soundfx("medfire", (8340,-3296,9), .2);
maps\mp\_fx::soundfx("medfire", (11127,3888,12), .2);
maps\mp\_fx::soundfx("medfire", (11264,-2696,13), .1);
maps\mp\_fx::soundfx("medfire", (10531,-1872,26), .1);



}


edited on Nov. 22, 2006 06:14 am by KillerKlown75

edited on Nov. 22, 2006 06:18 am by KillerKlown75
Share |
FlesyM
General Member
Since: Jul 24, 2005
Posts: 399
Last: Jan 24, 2008
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Wednesday, Nov. 22, 2006 07:42 pm
the line

level._effect["fire"] = ...

defines an effect name for the whole map, whichever gsc file this line is in. so the name between the "" must be unique for unique effects.
Share |
Altheim
General Member
Since: Oct 13, 2005
Posts: 29
Last: Mar 15, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Wednesday, Nov. 22, 2006 11:48 pm
Worked like a champ bud! There was one "(" missing in the precache description that kicked out an error but after I found that everything worked. Thanks for the education on this guys! You all are my main source for info on mapping! Thanks again! Alt
Share |
KillerKlown75
General Member
Since: Sep 27, 2006
Posts: 39
Last: Jan 31, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Thursday, Nov. 23, 2006 01:40 am
Not a problem, glad that it worked!
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

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

»