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

Members Online

»
1 Active | 62 Guests
Online:

LATEST FORUM THREADS

»
New Game
General Gaming
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
Category: CoD Mapping
CoD mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: Problem for multiple Explosive walls
soyeur
General Member
Since: Oct 12, 2007
Posts: 3
Last: May 11, 2020
[view latest posts]
Level 0
Category: CoD Mapping
Posted: Sunday, May. 10, 2020 01:16 pm
hello im able to create an explosive wall , but the second doesnt work , do i need to have multiple gsc file for each explosive walls?
how should look the gsc file with multiple breakable walls??
only the first breakble wall works and i dont know work the seconde one , when i press f nothing happen

mine is =
main()
{
setCullFog (0, 13500, .32, .36, .40, 0);
ambientPlay("ambient_mp_brecourt");

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

// Precache the model we will use once the bomb is planted on the wall
precacheModel("xmodel/bomb");
// Set up the effects used for wall explosion
level._effect["wallexplosion"] = loadfx("fx/explosions/mp_bomb.efx");
level._effect["wallexplosion2"] = loadfx("fx/explosions/explosion1_heavy.efx");

game["allies"] = "american";
game["axis"] = "german";

game["american_soldiertype"] = "airborne";
game["american_soldiervariation"] = "normal";
game["german_soldiertype"] = "fallschirmjagergrey";
game["german_soldiervariation"] = "normal";

game["attackers"] = "allies";
game["defenders"] = "axis";

// Run the function that does the wall explosion
level wallbomb();
}

wallbomb()
{
// Get all of the wall parts, the bomb, and the bomb trigger
bomb = getent ("wallbomb","targetname");
bomb.trigger = getent (bomb.target,"targetname");
wallbefore = getent ("wallbefore","targetname");
wallafter = getent ("wallafter","targetname");

// Hide the destroyed version of the wall until it's blown up
wallafter hide();

// Wait until the bomb is triggered and is triggered by the right team
// Can change the team to "axis" if you want Axis to blow up the wall instead
while (1)
{
bomb.trigger waittill ("trigger",other);
if ((isplayer (other)) && (other.pers["team"] == "allies"))
break;
}

// The bomb was planted by the right team so play a bomb planting sound
bomb playsound ("MP_bomb_plant");

// Delete the bombs trigger since it's not needed anymore
bomb.trigger delete();

// Change the bomb model from the flashing bomb to the solid bomb model
bomb setmodel ("xmodel/bomb");

// Wait .5 seconds for the bomb planting sound to finish
wait .5;

// Now play a looping tick sound on the bomb
bomb playLoopSound("bomb_tick");

// Wait 15 seconds for the bomb to blow up, can change this to something else if you want
wait 15;

// Bomb will explode now so stop the ticking sound
bomb stopLoopSound("bomb_tick");

// Set the origin for the explosion and radius damage
origin = bomb getorigin();

// Delete the exploded bomb
bomb delete();

// Play the explosion effects
playfx(level._effect["wallexplosion"], origin);
playfx(level._effect["wallexplosion2"], origin);

// Do radius damage to kill players in the area, perameters are (origin, range, maxdistance, mindistance)
radiusDamage(origin, 500, 2000, 1000);

// Show the destroyed version of the wall
wallafter show();

// Delete the whole version of the wall
wallbefore delete();
}
wallbomb2()
{
// Get all of the wall parts, the bomb, and the bomb trigger
bomb = getent ("wallbomb2","targetname");
bomb.trigger = getent (bomb.target,"targetname");
wallbefore = getent ("wallbefore","targetname");
wallafter = getent ("wallafter","targetname");

// Hide the destroyed version of the wall until it's blown up
wallafter hide();

// Wait until the bomb is triggered and is triggered by the right team
// Can change the team to "axis" if you want Axis to blow up the wall instead
while (1)
{
bomb.trigger waittill ("trigger",other);
if ((isplayer (other)) && (other.pers["team"] == "allies"))
break;
}

// The bomb was planted by the right team so play a bomb planting sound
bomb playsound ("MP_bomb_plant");

// Delete the bombs trigger since it's not needed anymore
bomb.trigger delete();

// Change the bomb model from the flashing bomb to the solid bomb model
bomb setmodel ("xmodel/bomb");

// Wait .5 seconds for the bomb planting sound to finish
wait .5;

// Now play a looping tick sound on the bomb
bomb playLoopSound("bomb_tick");

// Wait 15 seconds for the bomb to blow up, can change this to something else if you want
wait 15;

// Bomb will explode now so stop the ticking sound
bomb stopLoopSound("bomb_tick");

// Set the origin for the explosion and radius damage
origin = bomb getorigin();

// Delete the exploded bomb
bomb delete();

// Play the explosion effects
playfx(level._effect["wallexplosion"], origin);
playfx(level._effect["wallexplosion2"], origin);

// Do radius damage to kill players in the area, perameters are (origin, range, maxdistance, mindistance)
radiusDamage(origin, 500, 2000, 1000);

// Show the destroyed version of the wall
wallafter show();

// Delete the whole version of the wall
wallbefore delete();

edited on May. 10, 2020 01:24 pm by soyeur
Share |
morgawr
General Member
Since: Dec 15, 2004
Posts: 372
Last: May 10, 2020
[view latest posts]
Level 5
Category: CoD Mapping
Posted: Sunday, May. 10, 2020 04:35 pm
I've only done 1 before, but I thing each one needs it's own name
and needed files
bomb 1
bomb 2
whatever
Share |
StrYdeR
General Member
Since: May 11, 2004
Posts: 11664
Last: May 13, 2020
[view latest posts]
Level 10
Admin
Forum Moderator
Im a HOST of MODSonair
Category: CoD Mapping
Posted: Monday, May. 11, 2020 07:30 am
as stated in the previous reply, each part needs to have its own naming - or - you need to do build an array

simpler for beginners to create naming conventions so bomb, then bomb2 then bomb3, etc - same for wallbefore and wallafter

[angryalien]
Share |
soyeur
General Member
Since: Oct 12, 2007
Posts: 3
Last: May 11, 2020
[view latest posts]
Level 0
Category: CoD Mapping
Posted: Monday, May. 11, 2020 08:07 am
thanks you ! so if i understand well , for the first wall i call the targetname '' wallbomb'' , for walls '' wallafter and wallbefore '' and the gsc file , for the next one i remake a new wall with targetname '' wallbomb2'' , ''wallafter2 , wallbefore2 '' and a second gsc file called wallbomb2 , this is it ?
Share |
StrYdeR
General Member
Since: May 11, 2004
Posts: 11664
Last: May 13, 2020
[view latest posts]
Level 10
Admin
Forum Moderator
Im a HOST of MODSonair
Category: CoD Mapping
Posted: Monday, May. 11, 2020 08:29 am
yes and no
your naming convention is right for in the map - everything in 1 gsc:
level wallbomb();
level wallbomb2();
...etc

then make sure that you are getting the correct "bomb" entity in each sub

[angryalien]
Share |
soyeur
General Member
Since: Oct 12, 2007
Posts: 3
Last: May 11, 2020
[view latest posts]
Level 0
Category: CoD Mapping
Posted: Monday, May. 11, 2020 08:57 am
yeeeahhhh i done ittt !!!! thanks for your help now i can keep building my map for the SOW clan yeeeeeeahhhh
Share |
Restricted Access Restricted Access subscribe
MODSonline.com Forums : Call of Duty : CoD 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

»