Bomber plane multiple bombs help!

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
Annihillator
Private
Posts: 2
Joined: Sun Jul 10, 2005 3:44 am
Contact:

Bomber plane multiple bombs help!

Post 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
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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

}
}
Image
User avatar
Mj
Map Reviewer
Posts: 1394
Joined: Sun Apr 25, 2004 3:36 pm
Location: England

Post by Mj »

Hey, you're in Iraq? Welcome to .map! My father is also out there at the moment. Whats the weather like? :)
ImageImage
Annihillator
Private
Posts: 2
Joined: Sun Jul 10, 2005 3:44 am
Contact:

Post 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.
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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
Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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:
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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 .
Image
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

Post by small_sumo »

I like the global/strafe.scr bdb wrote it works great and is easy to use.
Image

www.smallsumo.tk

Yeah Truth above Honor Man ;)
Post Reply