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

Members Online

»
0 Active | 52 Guests
Online:

LATEST FORUM THREADS

»
Call of DutyŽ: WWII
CoD WW2 General
SOF2 Prefabs map
SoFII Mapping
coduo mapping tools
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 Topic is Locked
Page
Next Page
subscribe
Author Topic: How to add Effects
lineage2soul
General Member
Since: Oct 25, 2010
Posts: 24
Last: Nov 8, 2010
[view latest posts]
Level 1
Category: CoD2 MP Mapping
Posted: Tuesday, Oct. 26, 2010 02:36 pm
Hello.
1.) Open Iw_7.iwd whit winrar
Go to folder Maps->mp
open mapname.gsc file and add this script:

Code:
main()
{

maps\mp\_load::main();
maps\mp\YOURMAPNAME_fx::main();

level.rasta_cod2_rain = loadfx ("fx/folder/File.efx");

}

Example for map mp_toujane and Rain Effect
Code:

main()
{
	//maps\pam\pam_setup::main();

	maps\mp\_load::main();
	maps\mp\mp_toujane_fx::main();
	maps\mp\_load::main();

level.rasta_cod2_rain = loadfx ("fx/misc/rain_9.efx");

	thread Ambient_Sound();


	game["allies"] = "british";
	game["axis"] = "german";
	game["attackers"] = "allies";
	game["defenders"] = "axis";
	game["british_soldiertype"] = "africa";
	game["german_soldiertype"] = "africa";

	setcvar("r_glowbloomintensity0",".25");
	setcvar("r_glowbloomintensity1",".25");
	setcvar("r_glowskybleedintensity0",".5");

	if(getcvar("g_gametype") == "hq")
	{
		level.radio = [];
		level.radio[0] = spawn("script_model", (285.332, 471.947, 12.1747));
		level.radio[0].angles = (0, 335.6, 0);

		level.radio[1] = spawn("script_model", (-7.80745, 1100.36, -11.0072));
		level.radio[1].angles = (355.751, 55.1337, -2.21861);

		level.radio[2] = spawn("script_model", (1282.54, 731.845, -1.99999));
		level.radio[2].angles = (0, 133.073, 0);

		level.radio[3] = spawn("script_model", (2206.32, 411.609, 54.6547));
		level.radio[3].angles = (2.21806, 151.797, -7.6227);

		level.radio[4] = spawn("script_model", (758.63, 1725.03, 148));
		level.radio[4].angles = (0, 354.855, 0);

		level.radio[5] = spawn("script_model", (1558.4, 1569.03, 96.0133));
		level.radio[5].angles = (0.629538, 196.751, -2.07329);

		level.radio[6] = spawn("script_model", (986.298, 3040.61, 58.7701));
		level.radio[6].angles = (0.640552, 196.255, -3.11342);

		level.radio[7] = spawn("script_model", (2295.88, 2483.53, 70.7077));
		level.radio[7].angles = (1.35945, 129.516, 1.18606);

		level.radio[8] = spawn("script_model", (2971.51, 1570.41, 45.4606));
		level.radio[8].angles = (0.282498, 74.994, -0.237561);

		level.radio[9] = spawn("script_model", (1758, 653.443, 176));
		level.radio[9].angles = (0, 39.351, 0);
	}

	if (getcvar("scr_remove_killtriggers") == "" || getcvarint("scr_remove_killtriggers") < 1)
	{
		level.killtriggers[0] = spawnstruct();
		level.killtriggers[0].origin = (1775, 2886, 764);
		level.killtriggers[0].radius = 200;
		level.killtriggers[0].height = 233;


		if (getcvar("g_gametype") != "strat")
			thread maps\mp\_killtriggers::init();
	}
}

Ambient_Sound()
{
	while (!isdefined(game["ambient_weather"]))
	{
		wait 0.1;
	}

	if ( game["ambient_sounds"] )
		ambientPlay("ambient_africa");
	
	if ( game["ambient_fog"] )
		setExpFog(0.00015, 0.9, 0.95, 1, 0);
}

Save and close it.
Open Your mapname_fx.gsc and add this script:

Code:
main()
{
     level thread rasta_cod2_rain();
}

rasta_cod2_rain()

{   
   zufall = RandomInt(100);      
         
   while(1) {
      
   
      players = getentarray("player", "classname");      
      
      if(players.size > 0) {
      
         max_nodes       = 20;
         max_nodes_per_player    = max_nodes/players.size;
      
      
         for(ii=0;ii<max_nodes_per_player;ii++) {
         
            for(i = 0; i < players.size; i++) {
                  
               player = players[i];
                     
               if(isAlive(player)) {
               
                  x= 350-randomfloat(700);
                  y= 350-randomfloat(700);               
            
                     pos = player.origin +(x,y,200) ;                  
                     trace = bulletTrace(pos,pos +(0,0,-250), true, undefined);
                     
                     if(trace["fraction"] != 1) playfx(level.rasta_cod2_rain,trace["position"]);            
                     wait 0.05;
                                           
               }                  
            }
         }               
      }
      
      wait 0.05;
   }   
}

Example for map mp_toujane
Code:

main()
{
	precacheFX();
	thread ambientFX();
	exploderFX();
	level.scr_sound["flak88_explode"]			= "flak88_explode";
     level thread rasta_cod2_rain();
}

rasta_cod2_rain()

{   
   zufall = RandomInt(100);      
         
   while(1) {
      
   
      players = getentarray("player", "classname");      
      
      if(players.size > 0) {
      
         max_nodes       = 20;
         max_nodes_per_player    = max_nodes/players.size;
      
      
         for(ii=0;ii<max_nodes_per_player;ii++) {
         
            for(i = 0; i < players.size; i++) {
                  
               player = players[i];
                     
               if(isAlive(player)) {
               
                  x= 350-randomfloat(700);
                  y= 350-randomfloat(700);               
            
                     pos = player.origin +(x,y,200) ;                  
                     trace = bulletTrace(pos,pos +(0,0,-250), true, undefined);
                     
                     if(trace["fraction"] != 1) playfx(level.rasta_cod2_rain,trace["position"]);            
                     wait 0.05;
                                           
               }                  
            }
         }               
      }
      
      wait 0.05;
   }   
}

precacheFX()
{
	level._effect["flak_explosion"]				= loadfx("fx/explosions/flak88_explosion.efx");
	level._effect["dust_wind"]					= loadfx("fx/dust/dust_wind_brown.efx");
	level._effect["fogbank_small_duhoc"]		= loadfx ("fx/misc/fogbank_small_duhoc.efx");
	level._effect["smoke_plumeBG"]				= loadfx ("fx/smoke/smoke_plumeBG_toujane.efx");

}

ambientFX()
{
	while (!isdefined(game["ambient_weather"]))
	{
		wait 0.1;
	}
}


You can change Effect in iw_07_iwd -> fx folder
so change only MAPNAME.gsc
level.rasta_cod2_rain = loadfx ("fx/folder/File.efx");
Example if you want to add Green Smoke write This:
level.rasta_cod2_rain = loadfx ("fx/smoke/green_smoke_40sec_duhoc.efx");

Ty to ivan_cro and Me


edited by Mystic - added code boxes
Share |
Mystic
General Member
Since: Apr 10, 2004
Posts: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: CoD2 MP Mapping
Posted: Tuesday, Oct. 26, 2010 02:58 pm
Fixed you post by adding code boxes.

Also i don't understand why you are using the weather effect script i wrote for earlier games to play a single smoke effect? Did you actually test this because it will play the effect all around the player.

Quote:
Ty to ivan_cro and Me


Naughty, naughty atleast change the thread names and level fx call when trying to steal work..
Share |
StrYdeR
General Member
Since: May 11, 2004
Posts: 11656
Last: Jul 3, 2019
[view latest posts]
Level 10
Admin
Forum Moderator
Im a HOST of MODSonair
Category: CoD2 MP Mapping
Posted: Tuesday, Oct. 26, 2010 04:32 pm
Mystic writes...
Quote:


Quote:
Ty to ivan_cro and Me


Naughty, naughty atleast change the thread names and level fx call when trying to steal work..


ROFL!

PWND!!!!

[angryalien]
Share |
eganwotv
Deactivated Account
Since: May 28, 2007
Posts: 961
Last: Oct 31, 2010
[view latest posts]
Level 7
Im a fan of MODSonair
Category: CoD2 MP Mapping
Posted: Tuesday, Oct. 26, 2010 05:41 pm
Did you thank yourself when you were born?
Share |
ivan_cro
General Member
Since: Jul 21, 2008
Posts: 463
Last: Oct 27, 2010
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Wednesday, Oct. 27, 2010 02:05 am
Problems guys?
Share |
ivan_cro
General Member
Since: Jul 21, 2008
Posts: 463
Last: Oct 27, 2010
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Wednesday, Oct. 27, 2010 02:09 am
Quote:
..when trying to steal work..


Mystic! Naughty boy! How weird that came from you!

Helping people with tutorials is called stealing someone's work?
Well, than my friend, you must've been real theft around here.



Ivan

Post script: lineage2soul I appreciate your tutorial and giving some credit to me [biggrin] Great easy tut! [thumbs_up]

@Mystic: Next time you try to trash someone remember of your own sentence you PM me and just change words "question" with "thread.
So WHAT if he used script from your tut? Aren't we "Sharing community and helping people?".

Blind or dumbo?

Quote:
Ty to ivan_cro and Me

Ever thought...maybe he meant Ty by saying thank you for steps and the way you do it, and not for your, YOUR OWN, oh for Christ sake YOUR script?


Share |
Mystic
General Member
Since: Apr 10, 2004
Posts: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: CoD2 MP Mapping
Posted: Wednesday, Oct. 27, 2010 03:16 am
Don't try and insult me ivan.

As for the PM i sent you I was trying to help you by understanding not everything is an arguement, you just lock horns any chance you get. This thread alone shows you cannot talk in a mature and respectful way. Post the pm here without editing it if you want.

Did you even read what i wrote, the script you used won't even do the job. You don't add a single effect to a map using that method. Tell you what, go a follow your 'tutorial' and when you get it too work you will find smoke will spawn all around the player and your look like a walking, laggy cloud. You must understand the script before making a tutorial based on it.

Clip art.. really? [ohwell]

Lets say you wrote a script, it isn't yours because you are just writing it for a developers game, making a map is the same thing, also a mod. None of it is yours but you appreciate credit for the work you put in. I don't care if it used or not your looking too deep into this, the main point of my post is saying it wouldn't work, thats why i didn't say i appreciated the effort.

The difference between myself and you is i can discuss something instead turning it into a fight, i do help people or atleast try too here, nearly every post you make is a useless attempt at causing a arguement. I don't understand why? But personally i don't think you fit into this community, your not here to help so maybe find somewhere you will enjoy better? I'm not telling you to do anything, just a suggestion.



Share |
Mystic
General Member
Since: Apr 10, 2004
Posts: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: CoD2 MP Mapping
Posted: Wednesday, Oct. 27, 2010 03:21 am
Here you go the PM i sent you;

Quote:
Posted: Monday, Oct 25, 2010 12:47 pm
Quote:
Quote:
I do understand what you mean, a lot of people start a new thread to ask a question they don't even want to try and find the answer too. I get sometimes 20+ messages everyday asking the most simple questions to which i link a tutorial.

But because this community is about helping people with game modding i would appreciate it if when you do answer, do so as accurate as you can, even if in your opinion is thats its a stupid question.

Thanks.



Ok, got it

Ivan
Share |
lineage2soul
General Member
Since: Oct 25, 2010
Posts: 24
Last: Nov 8, 2010
[view latest posts]
Level 1
Category: CoD2 MP Mapping
Posted: Wednesday, Oct. 27, 2010 03:22 am
Ok then i won't post anymore on modsonline i have some good scripts but if you flame all my scripts then its not point to share it.
Share |
ivan_cro
General Member
Since: Jul 21, 2008
Posts: 463
Last: Oct 27, 2010
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Wednesday, Oct. 27, 2010 04:20 am
Could you explain how immature (Me) (14 year old) can behave mature (as he is not 18)?

Maybe you should start threating people like you are not some kind of modsonline god, by looking and talking everyone "from the top". (I would be ashamed if 14 year old (Croat) would have to teach me that)

Get to the ground dude and behave like any other member of this site, as noone really cares how long you've been a member, beacuse I respect those that are here one day, 2 weeks, 5 or 10 years, ofcourse considering how they behave.

My immature talk?

I talk immature to people that behave immature to me, just so you know, as one of your best "friends" told me on some posts that they could never guess that I am 14 by a way I talked to them (they thought I'm older if you don't understand).

Hope you understand and that I will not need another clip art picture so you could understand.

Now I suspect you gonna do this "your" way and lock topic. Thats really mature.

Ivan

Now again; blind or dumbo?

By mentioning your PM I didn't mean (ONCE AGAIN) I didn't mean exactly what it wrote but swap few words so you will (hopefully) understand. Or we will all draw clip arts for you.
Share |
Restricted Access Topic is Locked
Page
Next Page
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

»