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

Members Online

»
0 Active | 67 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP 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: CoDUO Mapping
CoD United Offensive mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Help combining two gsc files?
Maddogg8472
General Member
Since: Jun 18, 2004
Posts: 55
Last: Aug 22, 2008
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Tuesday, Nov. 1, 2005 02:25 am
heres my problem

ive got a map gsc file with its own mapname fx gsc.
Ive just added a destrucatable wall with the plant bomb (not as an objective just TDM etc) using the bomb video tute.
But as my main gsc file has retrieval set up i dont know where in my main map gsc to put the bomb script stuff.
Also as my SD has the script fx called in my own map fx gsc do i still need to add the line for the bomb fx gsc file?
My map gsc and bomb gsc are below can someone show me where in my file to add the bomb script stuff?
when i tried running my map UO just crashed my puter

Ive changed the targetname for my destructable wall to barnfloorbefore/barnfloorafter

Heres my main gsc:
main()
{
setCullFog (0, 8000, 0.8, 0.8, 0.8, 0);
ambientPlay("ambient_mp_railyard");

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


maps\mp\hatchA::main();
maps\mp\hatchB::main();
maps\mp\hatchC::main();
maps\mp\hatchD::main();
maps\mp\hatchE::main();
maps\mp\hatchF::main();
maps\mp\engineroom1::main();
maps\mp\engineroom2::main();
maps\mp\lifts::main();
maps\mp\lift1left::main();
maps\mp\lift1right::main();
maps\mp\lift2left::main();
maps\mp\lift2right::main();
maps\mp\lift1top::main();
maps\mp\lift1bottom::main();
maps\mp\lift2top::main();
maps\mp\lift2bottom::main();
maps\mp\maindoorleft::main();
maps\mp\maindoorright::main();
maps\mp\securea::main();


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

game["russian_soldiertype"] = "airborne";
game["russian_soldiervariation"] = "winter";
game["german_soldiertype"] = "fallschirmjagercamo";
game["german_soldiervariation"] = "winter";

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

game["layoutimage"] = "mp_railyard";

//retrieval settings

level.obj["1"] = (&"RE_OBJ_ARTILLERY_MAP");
level.obj["2"] = (&"RE_OBJ_WEAPON_PANZERFAUST");
game["re_attackers"] = "allies";
game["re_defenders"] = "axis";
game["re_attackers_obj_text"] = (&"RE_OBJ_HURTGEN_OBJ_ATTACKER");
game["re_defenders_obj_text"] = (&"RE_OBJ_HURTGEN_OBJ_DEFENDER");
game["re_spectator_obj_text"] = (&"RE_OBJ_HURTGEN_OBJ_SPECTATOR");
game["re_attackers_intro_text"] = ("Primary Objective is the german artillry maps. Secondary Objective is an experimental long range RPG weapon");
game["re_defenders_intro_text"] = ("Primary Objective ");



}

Heres the bomb gsc:

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 ("barnfloorbefore","targetname");
wallafter = getent ("barnfloorafter","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();
}

Thanks anyone who can help[cool]
Share |
Wyatt_Earp
Preferred Member
Since: Jan 20, 2004
Posts: 628
Last: Jun 6, 2008
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Tuesday, Nov. 1, 2005 02:56 am
First,

The map.gsc should be its own file. You can have the map.gsc reference the BOMB.gsc at the top like you have for the others.

maps\mp\BOMB::main();

The purpose of doing separate gsc files is this reason. Easy code management and debugging.

Always, always, separate your other gsc stuff from your actual MAP.gsc. Just reference it, like I showed you or the same as your lift..

The same applies for your effects, place them in thier own file and call them from your map.gsc.

maps\mp\MyMapEffects::main();
maps\mp\whatever::main();
maps\mp\whatever2::main();

Share |
Maddogg8472
General Member
Since: Jun 18, 2004
Posts: 55
Last: Aug 22, 2008
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Tuesday, Nov. 1, 2005 10:19 am
that would explain it then thanks again.

PS. Great vids by the way i now have SD and RE in my map coz of them.
Share |
Maddogg8472
General Member
Since: Jun 18, 2004
Posts: 55
Last: Aug 22, 2008
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Wednesday, Nov. 2, 2005 09:41 pm
Now ive just put the line in my map gsc that calls the bomb gsc as:

maps\mp\bomb::main();

And below is the bomb gsc after ive taken the lines out of the bomb gsc that set the game settings and the load::main etc.
But whenever i try and run my map (when calling the bomb gsc) my COD UO freezes and i have to re start my PC. My fx file is identical to the bomb fx so thats what i call in the bomb gsc.
Any ideas from anyone as to why it dont work?

main()
{
maps\mp\stronghold_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");

// 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();
}

[wave]
Share |
RRRScorpion
General Member
Since: Feb 2, 2004
Posts: 169
Last: Dec 3, 2005
[view latest posts]
Level 4
Category: CoDUO Mapping
Posted: Thursday, Nov. 3, 2005 04:42 am
add this to your main map gsc file -

// 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");

// 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();
}

adnd call up the fx file from this file aswell.

delete the bomb.gsc as i've found it works better this way.

why is the fx file the same as the bombfile?

Scorps
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoDUO Mapping
Posted: Thursday, Nov. 3, 2005 07:45 am
[eek] This hit me in the eye as soon as I looked at your script.

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


No wonder it locks up! [crazy]
It should be level thread wallbomb();

Also you should do all your precache stuff BEFORE calling other threads or scripts, what if those other threads or scripts needed those precached fx's and aliases? they would complain yes?

I didn't read any further down the script, fix that first and see how it goes.

Regards Grassy
Share |
Maddogg8472
General Member
Since: Jun 18, 2004
Posts: 55
Last: Aug 22, 2008
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Thursday, Nov. 3, 2005 06:52 pm
well i did what you said Grassy and when my map load in UO the was a mild console error in the console about

CMod_loadnodes: children exceeded?![confused]

i didnt actually write this script i downloaded it from this website so i dont think i should have to change any of the lines in it...

edited on Nov. 3, 2005 01:54 pm by Maddogg8472
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoDUO Mapping
Posted: Saturday, Nov. 5, 2005 05:37 am
Sorry for the delay, Cod2 got in the way! [casanova]

Quote:
CMod_loadnodes: children exceeded?!


Hmmm, I have seen this error before but can't remember now what causes it. Try testing in dev mode and record the line and location and exact error you are getting.
The above error could be related to something else.

Grassy
Share |
M@DCROW @CHILLES
General Member
Since: Dec 3, 2004
Posts: 519
Last: Nov 21, 2007
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Saturday, Nov. 5, 2005 07:05 am
Hmm.. Never heard of this error either.. Hang on let me ask Michael Jackson.. Hmm.. Nope he has never had an error for children exceeded either [lol][lol]
Share |
Maddogg8472
General Member
Since: Jun 18, 2004
Posts: 55
Last: Aug 22, 2008
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Sunday, Nov. 6, 2005 01:13 am
well im going to try and reduce the size of my skybox and see if that helps. Im not sure if theres a limit on its size but my SB is:
104024 L X 100722 W X 43452 H

And my map surface area
is:
14480 L X 13824 W
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty : CoDUO 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

»