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

Members Online

»
1 Active | 46 Guests
Online:

LATEST FORUM THREADS

»
Mohaa maps on Cod2?
CoD2 MP 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 subscribe
Author Topic: Mortar fire
cod2fun
General Member
Since: Aug 26, 2009
Posts: 75
Last: Sep 13, 2010
[view latest posts]
Level 3
Category: CoD2 MP Mapping
Posted: Sunday, Sep. 5, 2010 07:16 am
How to make looping mortar fire ...on water surface...have bridge and need non stop mortar explosion around bridge,,,...how to start ? I have done motar fire tutorial on one map but that was only one shot ....
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: Sunday, Sep. 5, 2010 07:53 am
Code:
level._effect["mortexplosion"] = loadfx("fx/explosions/artilleryExp_dirt_brown.efx");


thread mortar1();


}

mortar1()
{

action = getent ("action","targetname"); 
botground = getent ("botlayer","targetname"); 
topground = getent ("toplayer","targetname");
trigger = getent ("morttrig","targetname");

botground hide(); 

trigger waittill ("trigger"); 

origin = action getorigin();

action playsound("incoming_mortar");

wait (1);

action playsound("explosion_ground");

playfx(level._effect["mortexplosion"], origin);

botground show();

topground delete();

wait (0.5);

thread mortar1();

}


This should work.

ivan_cro

EDIT: In this row ( wait (0.5)) you can set as much seconds as you wish. Your mortar will show now for every 1/2 second.

edited on Sep. 5, 2010 10:53 am by ivan_cro
Share |
cod2fun
General Member
Since: Aug 26, 2009
Posts: 75
Last: Sep 13, 2010
[view latest posts]
Level 3
Category: CoD2 MP Mapping
Posted: Sunday, Sep. 5, 2010 11:03 am
ivan_cro writes...
Quote:
Code:
level._effect["mortexplosion"] = loadfx("fx/explosions/artilleryExp_dirt_brown.efx");


thread mortar1();


}

mortar1()
{

action = getent ("action","targetname"); 
botground = getent ("botlayer","targetname"); 
topground = getent ("toplayer","targetname");
trigger = getent ("morttrig","targetname");

botground hide(); 

trigger waittill ("trigger"); 

origin = action getorigin();

action playsound("incoming_mortar");

wait (1);

action playsound("explosion_ground");

playfx(level._effect["mortexplosion"], origin);

botground show();

topground delete();

wait (0.5);

thread mortar1();

}


This should work.

ivan_cro

EDIT: In this row ( wait (0.5)) you can set as much seconds as you wish. Your mortar will show now for every 1/2 second.

edited on Sep. 5, 2010 10:53 am by ivan_cro

pričat ču na eng da ovi nebi kenjali

ok this is code but what i need to do in radiant?
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: Sunday, Sep. 5, 2010 12:32 pm
RADIANT

Come to place where you want your explosion, right click in 2D window, script -> origin. Open up entity window (key N) and type in following:

KEY targetname
VALUE mortar_origin

.GSC SCRIPTS

Add following to your .gsc file.

Code:
thread mortar();
}

mortar()
{

level._effect["mortexplosion"] = loadfx("fx/explosions/artilleryExp_dirt_brown.efx");

action = getent ("mortar_origin","targetname"); 

wait (1);

origin = action getorigin();

action playsound("incoming_mortar");

wait (1);

action playsound("explosion_ground");

playfx(level._effect["mortexplosion"], origin);

wait (3);				//nakon koliko sekundi ce opet pasti

thread mortar();
}


.CSV SOUND FILE

Code:
incoming_mortar,,Explosions/artillery_incoming01.wav,1,1,,1,1,5000,6000,auto,streamed,,,,mp_YOURMAPNAME,,,,, 
explosion_ground,,Explosions/Mortar_dirt01.wav,1,1,,1,1,5000,6000,auto,streamed,,,,mp_YOURMAPNAME,,,,,


That is pretty much it.

ivan_cro
Share |
cod2fun
General Member
Since: Aug 26, 2009
Posts: 75
Last: Sep 13, 2010
[view latest posts]
Level 3
Category: CoD2 MP Mapping
Posted: Sunday, Sep. 5, 2010 01:40 pm
******* script compile error *******
bad syntax: (file 'maps/mp/mp_mortar.gsc', line 1)
thread mortar();
*

do you know what error is this ?
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: Sunday, Sep. 5, 2010 08:47 pm
Mate you will have to include the rest to your .gsc file. Whenever you are making simple test map like this one, you need to include at least primary stuff.

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

}


So your code should look like this.

Code:
main()
{

maps\mp\_load::main();

thread mortar();

}

mortar()
{

level._effect["mortexplosion"] = loadfx("fx/explosions/artilleryExp_dirt_brown.efx");

action = getent ("mortar_origin","targetname"); 

wait (1);

origin = action getorigin();

action playsound("incoming_mortar");

wait (1);

action playsound("explosion_ground");

playfx(level._effect["mortexplosion"], origin);

wait (3);				//nakon koliko sekundi ce opet pasti

thread mortar();

}


This will work for ya.

ivan_cro
Share |
cod2fun
General Member
Since: Aug 26, 2009
Posts: 75
Last: Sep 13, 2010
[view latest posts]
Level 3
Category: CoD2 MP Mapping
Posted: Sunday, Sep. 5, 2010 11:43 pm
I found out that main is missining...but new error is crated[banghead]

script runtime error
(see console for details)
(file'maps/mp/mp_mortar.gsc',line14)

this is mp_mortar.gsc
Code:
main()
{

thread mortar();
}

mortar()
{

level._effect["mortexplosion"] = loadfx("fx/explosions/artilleryExp_dirt_brown.efx");

action = getent ("mortar_origin","targetname"); 

wait (1);

origin = action getorigin();

action playsound("incoming_mortar");

wait (1);

action playsound("explosion_ground");

playfx(level._effect["mortexplosion"], origin);

wait (3);

thread mortar();
}


this is csv.
Code:
name,sequence,file,vol_min,vol_max,vol_mod,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle,compression,secondaryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage

#Ambiance


ambient_mp_remagen,,ambient/amb_russia05_ext.mp3,0.48,,,,,,,local,streamed,,looping,,mp_mapname

incoming_mortar,,Explosions/artillery_incoming01.wav,1,1,,1,1,5000,6000,auto,streamed,,,,mp_remagen,,,,, 
explosion_ground,,Explosions/Mortar_dirt01.wav,1,1,,1,1,5000,6000,auto,streamed,,,,mp_remagen,,,,,


and this is console mp log

******* script runtime error *******
type undefined is not a vector: (file 'maps/mp/mp_mortar.gsc', line 24)
playfx(level._effect["mortexplosion"], origin);
*
started from:
(file 'maps/mp/mp_mortar.gsc', line 20)
wait (1);
*
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: Monday, Sep. 6, 2010 05:58 am
First, fix your .csv file:

Code:
name,sequence,file,vol_min,vol_max,vol_mod,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle,compression,secondaryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage

#Ambiance


ambient_mp_remagen,,ambient/amb_russia05_ext.mp3,0.48,,,,,,,local,streamed,,looping,,mp_remagen

incoming_mortar,,Explosions/artillery_incoming01.wav,1,1,,1,1,5000,6000,auto,streamed,,,,mp_remagen,,,,, 
explosion_ground,,Explosions/Mortar_dirt01.wav,1,1,,1,1,5000,6000,auto,streamed,,,,mp_remagen,,,,,


And for the vector error, I will take some time later this afternoon and take a look at it.

I'm not scripter so you will have to be patient, as this is an improvised script, combined of few others.

I will tell you what else you can try until I take a closer look to it, I will be really busy so..

Instead of:

playfx(level._effect["mortexplosion"], origin);

This:

playfx(level._effect["mortexplosion"], action);

ivan_cro




Share |
cod2fun
General Member
Since: Aug 26, 2009
Posts: 75
Last: Sep 13, 2010
[view latest posts]
Level 3
Category: CoD2 MP Mapping
Posted: Monday, Sep. 6, 2010 04:33 pm
no problemo..see pls if you can what is wrong .. it is allways somthing about line 14 in mortar.gsc file ...[confused]
Share |
Restricted Access Topic is Locked 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

»