Exploding wall (2)
Posted: October 21st, 2009, 11:18 pm
Since my first topic was kinda big and probably most of the ppl didn't even want to take their time to read my problem and try to find the solution, here's a shorter one.
I wanna make a wall explode by triggering a bomb. I followed a tutorial by it's instructions and tried the script. The script didn't work, now I got some help from megazor and the CJ team, and now it's already better, but I still need some help at one part.
When I trigger the bomb, The perfect wall disappears, I hear an explosion sound, I also do see an explosion but not at the place where the perfect wall was, it's somewhere in the back of the map
.
I hope anyone knows what the problem is. Here's my script:
I wanna make a wall explode by triggering a bomb. I followed a tutorial by it's instructions and tried the script. The script didn't work, now I got some help from megazor and the CJ team, and now it's already better, but I still need some help at one part.
When I trigger the bomb, The perfect wall disappears, I hear an explosion sound, I also do see an explosion but not at the place where the perfect wall was, it's somewhere in the back of the map

I hope anyone knows what the problem is. Here's my script:
Thx alot!main()
{
maps\mp\_load::main();
precacheModel("xmodel/bomb");
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";
thread wallbomb();
}
wallbomb()
{
lol = loadfx("fx/explosions/mp_bomb.efx");
lal = loadfx("fx/explosions/explosion1_heavy.efx");
bomb = getent ("wallbomb","targetname");
bomb.trigger = getent (bomb.target,"targetname");
wallbefore = getent ("wallbefore","targetname");
wallafter = getent ("wallafter","targetname");
wallafter hide();
bomb.trigger waittill ("trigger",other);
bomb playsound ("MP_bomb_plant");
bomb.trigger delete();
bomb setmodel ("xmodel/bomb");
wait 0.5;
bomb playLoopSound("bomb_tick");
wait 5;
bomb stopLoopSound("bomb_tick");
bomb delete();
playfx(lol, wallbefore.origin);
playfx(lal, wallbefore.origin);
radiusDamage(origin, 500, 2000, 1000);
wallafter show();
wallbefore delete();
}