I have added flies to a pond in my map, this is how I did it.
1. Load your map in the Editor.
2. Change the view to the XY Top view using Ctl and Tab together.
3. Postition your mouse were you want the flies to appear on your map in the 2D window, the one on the left.
4. If you look at the bottom of the Editor you will see there is X,Y, and Z coordinates of where your mouse is, write down the X and Y numbers.
5. Change the view in the Editor to the XZ Front view using Ctl and Tab together.
6. Postition your mouse were you want the flies to appear on your map in the 2D window and write down the number.
7. Save your map and exit the Editor.
8. Using Notepad, enter this code.
The numbers in the code are the X, Y and Z locations.
-1344.0 is the X
2352.0 is the Y
80.0 is the Z
Change these numbers to the one's you wrote down earlier.
Code:
main()
{
precacheFX();
ambientFX();
} <br />
<br />
precacheFX() <br />
<br />
{
level._effect["insects_carcass_flies"] = loadfx ("fx/misc/insects_carcass_flies.efx");
} <br />
<br />
ambientFX() <br />
<br />
{
//Flies FX
maps\mp\_fx::loopfx("insects_carcass_flies", (-1344.0, -2352.0, 80.0), 0.2);
}
9. Save you file as:
mp_yourmapname_fx.gsc
Replace yourmapname with the name of your map, and make sure you don't save it as a txt file, it has to be a gsc file.
10. Put the file in the same folder as your main gsc file, main/maps/mp folder.
10. Add this line to your main gsc file that loads your map, replacing yourmapname with the name of your map.
Code:
maps\mp\mp_yourmapname_fx::main();
Example:
Code:
main()
{
maps\mp\mp_yourmapname_fx::main();
maps\mp\_load::main();
game["allies"] = "american";
game["axis"] = "german";
game["attackers"] = "allies";
game["defenders"] = "axis";
game["american_soldiertype"] = "normandy";
game["german_soldiertype"] = "normandy";
/Set some cvars.
setcvar("r_glowbloomintensity0","1");
setcvar("r_glowbloomintensity1","1");
setcvar("r_glowskybleedintensity0",".25");
}
To add flies in different locations on your map you can simply add them under: (remembering to change the X, Y and Z for the new posistions of your flies)
Code:
//Flies FX
maps\mp\_fx::loopfx("insects_carcass_flies", (-1344.0, -2352.0, 80.0), 0.2);
Example:
Code:
//Flies FX
maps\mp\_fx::loopfx("insects_carcass_flies", (-1344.0, -2352.0, 80.0), 0.2);
maps\mp\_fx::loopfx("insects_carcass_flies", (-1392.0, -2228.0, 80.0), 0.2);
maps\mp\_fx::loopfx("insects_carcass_flies", (-1264.0, -2216.0, 80.0), 0.2);
maps\mp\_fx::loopfx("insects_carcass_flies", (-1160.0, -2264.0, 80.0), 0.2);
maps\mp\_fx::loopfx("insects_carcass_flies", (-1472.0, -2456.0, 80.0), 0.2);
maps\mp\_fx::loopfx("insects_carcass_flies", (-1344.0, -2526.0, 80.0), 0.2);
This is my mp_summerh_fx.gsc file to use as an example:
Code:
main()
{
precacheFX();
ambientFX();
}
precacheFX()
{
level._effect["thin_light_smoke_L"] = loadfx ("fx/smoke/thin_light_smoke_L.efx");
level._effect["insects_carcass_flies"] = loadfx ("fx/misc/insects_carcass_flies.efx");
level._effect["lantern_light"] = loadfx ("fx/props/glow_latern.efx");
level._effect["building_fire_small"] = loadfx ("fx/fire/building_fire_small.efx");
}
ambientFX()
{
// Add your smoke, flies, fire effects etc... here
//Smoke FX
maps\mp\_fx::loopfx("thin_light_smoke_L", (407.0, 2016.0, 1715.0), 0.6);
maps\mp\_fx::loopfx("thin_light_smoke_L", (-360.0, 2016.0, 1713.0), 0.6);
maps\mp\_fx::loopfx("thin_light_smoke_L", (687.0, -3641.0, 576.0), 0.6);
maps\mp\_fx::loopfx("thin_light_smoke_L", (942.0, -3639.0, 579.0), 0.6);
maps\mp\_fx::loopfx("thin_light_smoke_L", (-848.0, -3832.0, 768.0), 0.6);
maps\mp\_fx::loopfx("thin_light_smoke_L", (-1488.0, -5072.0, 768.0), 0.6);
maps\mp\_fx::loopfx("thin_light_smoke_L", (-1480.0, -4400.0, 768.0), 0.6);
maps\mp\_fx::loopfx("thin_light_smoke_L", (-3424.0, -4592.0, 1664.0), 0.6);
maps\mp\_fx::loopfx("thin_light_smoke_L", (-3408.0, -5736.0, 1664.0), 0.6);
//Fire FX
maps\mp\_fx::loopfx("building_fire_small", (-1344.0, -2352.0, 80.0), 2);
//Flies FX
maps\mp\_fx::loopfx("insects_carcass_flies", (-1344.0, -2352.0, 80.0), 0.2);
maps\mp\_fx::loopfx("insects_carcass_flies", (-1392.0, -2228.0, 80.0), 0.2);
maps\mp\_fx::loopfx("insects_carcass_flies", (-1264.0, -2216.0, 80.0), 0.2);
maps\mp\_fx::loopfx("insects_carcass_flies", (-1160.0, -2264.0, 80.0), 0.2);
maps\mp\_fx::loopfx("insects_carcass_flies", (-1472.0, -2456.0, 80.0), 0.2);
maps\mp\_fx::loopfx("insects_carcass_flies", (-1344.0, -2526.0, 80.0), 0.2);
//Lanterns FX
maps\mp\_fx::loopfx("lantern_light", (-1158, -1470, 268), 0.3);
}