Here's the tutorial. http://codjumper.com/forums/viewtopic.php?f=18&t=2074
As I wanted to follow the tutorial's instructions perfectly, I created a new empty map to get a better overview.
I followed the instructions, and when I was done with mapping, I copied & pasted the script and placed it in my maps/mp folder of my .pk3 file.
For those who wanna see the script ( You can also click on the tutorial's link ) Here's what I have.
Now when I compiled, I started up CoD, and tried to test, CoD fails.. Always when I try it fails. It keeps stuck at one point, it doesn't even show me a levelshot, it just fails.main()
{
maps\mp\_load::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();
}
I tried several things to fix this, I first started with following the instructions again, and read the instructions carefully. After when I was done and compiled again, it still failed.
Then I tried to edit the script a bit. Now this is what I edited:
Here's a part from the script like it was before editing
Now you see these parts:main()
{
maps\mp\_load::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();
}
Now it didn't fail at loading anymore, but now the script is not working!// 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"); [/quote
and this part:I replaced them under the// Run the function that does the wall explosion
level wallbomb();, so that the wallbomb thread (?) became like this:wallbomb()
wallbomb()
{
// 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();
// 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();
}
I asked Nightmare for help via xfire, he told me that it was probably something wrong at mapping.
Ill post my .map file here soon if anybody asks me here.
Thanks alot!
P.S. I hope you wanna take your time to read this bigass topic.