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

Members Online

»
0 Active | 11 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

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: flies around dead animals
{UST}Hogan
General Member
Since: Aug 21, 2005
Posts: 238
Last: May 7, 2010
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, Jan. 13, 2007 10:19 am
is there a script for flies around dead animals and bodies?
Share |
{GITS}Cleaner
General Member
Since: May 23, 2006
Posts: 778
Last: Apr 23, 2011
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Saturday, Jan. 13, 2007 10:47 am
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); }


Share |
{UST}Hogan
General Member
Since: Aug 21, 2005
Posts: 238
Last: May 7, 2010
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, Jan. 13, 2007 10:53 am
thank you
Share |
privategrob
General Member
Since: May 19, 2004
Posts: 54
Last: Dec 2, 2008
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Thursday, Jan. 18, 2007 07:57 am
The easier way for me to become the coordinates in the editor is:

Make a info_null at the position of the flies (or any other position you want to know), save the map, select the info_null again an then press N. Now you can see the coordinates. After this, you can delete the info_null.

Regards
Private Grob
(Micka)

edited on Jan. 18, 2007 03:00 am by privategrob
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

»