| Author |
Topic: bomb |
| andyuk666 |
General Member Since: Apr 12, 2004 Posts: 74 Last: Jan 19, 2009 [view latest posts] |
|
|
|
Category: CoDUO Mapping Posted: Wednesday, Oct. 19, 2005 09:58 pm |
 |
Hi i downloaded wyatts tut on non objective bombs and followed it to the letter but... after i compile to test it the map loads with no gsc file whatsoever. When i put the gsc file in it will not load coduo just hangs is there something different in cod and uo that has to be changed from the tut he did for cod?
I have checked the targetnames etc for spelling errors but have none i have made sure i selected the bomb first then the trigger before i hit ctrl + k and still it hangs
this is the gsc file below
main()
{
setCullFog (0, 13500, .32, .36, .40, 0);
ambientPlay("ambient_mp_berlin");
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();
} |
|
|
|
| The_Caretaker |
General Member Since: Jun 8, 2004 Posts: 11625 Last: Jul 7, 2009 [view latest posts] |
|
|
|
|
| andyuk666 |
General Member Since: Apr 12, 2004 Posts: 74 Last: Jan 19, 2009 [view latest posts] |
|
|
|
|
| andyuk666 |
General Member Since: Apr 12, 2004 Posts: 74 Last: Jan 19, 2009 [view latest posts] |
|
|
|
|
| RRRScorpion |
 |
General Member Since: Feb 2, 2004 Posts: 169 Last: Dec 3, 2005 [view latest posts] |
|
|
|
|
| The_Caretaker |
General Member Since: Jun 8, 2004 Posts: 11625 Last: Jul 7, 2009 [view latest posts] |
|
|
|
|
| andyuk666 |
General Member Since: Apr 12, 2004 Posts: 74 Last: Jan 19, 2009 [view latest posts] |
|
|
|
Category: CoDUO Mapping Posted: Thursday, Oct. 20, 2005 04:23 pm |
 |
Ok now thats that working but i decided to add a second wall and bomb to the map and called the wallbefore for the second one wallbefore2 and the same with the wall after i called it wallafter2...Now the error i get is
getent used with more than one entity:
wallafter2 = getent ("wallafter2","targetname");
called from:
thread wallbomb2( );
here is the gsc as is just so you can see what i have then theres no confusion
main()
{
setCullFog (0, 13500, .32, .36, .40, 0);
ambientPlay("ambient_mp_berlin");
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");
//vehicles
level thread maps\mp\_tankdrive_gmi::main();
level thread maps\mp\_jeepdrive_gmi::main();
level thread maps\mp\_flak_gmi::main();
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
thread wallbomb();
thread wallbomb2();
}
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
bomb.trigger waittill ("trigger",other);
// 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
bomb2 = getent ("wallbomb2","targetname");
bomb2.trigger = getent (bomb2.target,"targetname");
wallbefore2 = getent ("wallbefore2","targetname");
wallafter2 = getent ("wallafter2","targetname");
// Hide the destroyed version of the wall until it's blown up
wallafter2 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
bomb2.trigger waittill ("trigger",other);
// 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
bomb2.trigger delete();
// Change the bomb model from the flashing bomb to the solid bomb2 model
bomb2 setmodel ("xmodel/bomb");
// Wait .5 seconds for the bomb planting sound to finish
wait .5;
// Now play a looping tick sound on the bomb
bomb2 playLoopSound("bomb_tick");
// Wait 15 seconds for the bomb to blow up, can change this to something else if you want
wait 10;
// Bomb will explode now so stop the ticking sound
bomb2 stopLoopSound("bomb_tick");
// Set the origin for the explosion and radius damage
origin2 = bomb2 getorigin();
// Delete the exploded bomb
bomb2 delete();
// Play the explosion effects
playfx(level._effect["wallexplosion"], origin2);
playfx(level._effect["wallexplosion2"], origin2);
// Do radius damage to kill players in the area, perameters are (origin, range, maxdistance, mindistance)
radiusDamage(origin2, 500, 2000, 1000);
// Show the destroyed version of the wall
wallafter2 show();
// Delete the whole version of the wall
wallbefore2 delete();
} |
|
|
|
| The_Caretaker |
General Member Since: Jun 8, 2004 Posts: 11625 Last: Jul 7, 2009 [view latest posts] |
|
|
|
Category: CoDUO Mapping Posted: Thursday, Oct. 20, 2005 04:32 pm |
 |
andyuk666 writes...Quote: Ok now thats that working but i decided to add a second wall and bomb to the map and called the wallbefore for the second one wallbefore2 and the same with the wall after i called it wallafter2...Now the error i get is
getent used with more than one entity:
wallafter2 = getent ("wallafter2","targetname");
called from:
thread wallbomb2( );
This means you've got more than one entity with the targetname "wallafter2". Go over your targetnames again.. looks like you may have made an error copying something. |
 |
|
|
|
|
mp_TempleCall of Duty: Mods: Multiplayer (624.12Kb)
|