Page 1 of 1

Bomber plane multiple bombs help!

Posted: Sun Jul 10, 2005 4:13 am
by Annihillator
I have been banging my head all night. I am new to mapping and scripting. I have learned alot through forums,tuts and trial and error. I have a plane that is set up to drop multiple bombs. The splinepaths are connected and the set numbers are correct. The problem is it drops the first bomb and that explodes and does exactly what it is suppose to do. The second bomb how ever i can see deploy and hit target but no explosion. Also the bombs can only be triggered 1 time but my planes i have scripted the triggers to reset and they work fine. So why would the bombs not repeat if they are on the same spline path?


Any help would be graetful in this matter.

thanks
Spc. Debord
U.S. ARMY
Camp Kalsu Iraq

Posted: Sun Jul 10, 2005 11:18 am
by bdbodger
Assumeing you are useing the global/bomber.scr this thread from that script may help
for (local.i=1;local.i<level.bombers+1;local.i++)
{
if (local.name == level.bomber[local.i].set)
{
if (level.bomber[local.i].loop == 0)
{
level.bomber[local.i].loop = -1
level.bomber[local.i] thread bombdrop local.name local.i
}
else
if (level.bomber[local.i].loop == 1))
level.bomber[local.i] thread bombdrop local.name local.i

}
}

Posted: Sun Jul 10, 2005 11:26 am
by Mj
Hey, you're in Iraq? Welcome to .map! My father is also out there at the moment. Whats the weather like? :)

Posted: Mon Jul 11, 2005 6:37 am
by Annihillator
Very hot the weather that is and tahnks for the welcome. I am running the global exploder scr.. I did get part of my problem solved with the bombs exploding. I am going to try the loop you recommended and i will post the results as soon as I possibly can. thanks for your help in advance I really appreciate it.

Posted: Mon Jul 11, 2005 8:29 am
by bdbodger
I see but the global/exploder.scr is a one shot script there isn't anything in the script to reset the explosion . I wrote something called the global/strafe.scr to make strafeing planes that can also bomb . It is at my site if you want to take a look at it . You can shut off the guns if you don't want them

Posted: Mon Jul 11, 2005 6:09 pm
by lizardkid
in other words, you'll need to make another path if you want two bombing runs.

bd's first post was kinda confusing. :wink:

Posted: Tue Jul 12, 2005 8:21 am
by bdbodger
No that is not true if you look at these two threads from the global/bomber.scr
bombdrop local.name local.num:
local.range = vector_length (self.origin - $("bomberplane" + local.name).origin) + 100
local.oldrange = local.range

// println local.range
local.time = level.time + 1
// while ((local.range < local.oldrange) || (local.range > 500))
while (level.time < local.time)
{
wait 0.1
}
while (local.range > 200)
{
local.oldrange = local.range
local.range = vector_length (self.origin - $("bomberplane" + local.name).origin)
wait 0.1
}

spawn script_model "targetname" ("bombdrop" + local.num)
$("bombdrop" + local.num) playsound drop_bomb
$("bombdrop" + local.num).origin = self.origin


$("bombdrop" + local.num) playsound drop_bomb

$("bombdrop" + local.num) model "ammo/us_bomb.tik"
$("bombdrop" + local.num) notsolid
$("bombdrop" + local.num) scale 1
$("bombdrop" + local.num) flypath self 2500 2000 256
// speed accell lookahead
$("bombdrop" + local.num) waitmove


thread spawntankshot $("bombdrop" + local.num).origin
if (self.setthread)
{
println ("Bomb from set " + local.name + " threading " + self.setthread)
$("bombdrop" + local.num) thread level.script::self.setthread
}
$("bombdrop" + local.num) delete

end
spawntankshot local.vec:

exec global/model.scr local.vec "models/emitters/explosion_mine.tik"

thread killwithboom local.vec
radiusdamage local.vec 500 500

end
If you do it as the script say then the bomb is not useing the global/exploder.scr it uses the models/emitters/explosion_mine.tik to do the explosion . If you want me to spell it out
if (level.bomber[local.i].loop == 1)
Use the loop key on the first spline of the bomb path the one with the targetname $bomber the spline path next to one of the splines that the plane flys that is the first spline of the path the bomb takes when it falls .

So targetname bomber give it a set number and the Key: loop Value: 1 then you will be able to use it again .

Posted: Tue Jul 26, 2005 12:07 am
by small_sumo
I like the global/strafe.scr bdb wrote it works great and is easy to use.