Page 1 of 1

setthread in bomber.scr

Posted: Mon Sep 29, 2003 5:57 pm
by bdbodger
In the global/bomber.scr is says
You can make the planes drop bombs by setting up similar paths using the model "ammo/us_bomb.tik", and the first spline on the path has targetname "bomber". Both the "bomber" and the "bomberpath" entities are given the same #set value, to associate them. You can give the bombers a $setthread value to make them run a thread in the level.script upon impact. They automatically do an explosion when they reach the end of their path.
I have done this but can't get it to work I have used setthread and $setthread neither works right now I have a info_splinepath first node $targetname bomber for the bomb this works the bomb drops but the thread won't work I have the level.script = line in my script . I can't find out what's wrong .

key: #set
value: 1
key: setthread
value: bombpatch

Posted: Mon Sep 29, 2003 8:21 pm
by jv_map
This can't possibly work as there is no way to launch a thread with a variable name (except with a work-around, but I don't think the original authors knew of it ;)).

Posted: Tue Sep 30, 2003 3:37 am
by bdbodger
They tried this
if (self.setthread)
{
println ("Bomb from set " + local.name + " threading " + self.setthread)
$("bombdrop" + local.num) thread level.script::self.setthread
}

Tutorial map

Posted: Tue Sep 30, 2003 4:27 am
by tltrude
Here is a bomber tutorial map. It should help you to see how it is done.

http://pages.sbcglobal.net/tltrude/Temp/test_bomber.zip

Image

By the way, the $setthread goes in the first node of the bomb path, but it will not call the thread untill the bomb reaches the last node in the path--see screenshot below.

Image

Posted: Tue Sep 30, 2003 5:56 am
by bdbodger
no problem with the bomber part of it just the setthread part of it I want to exec global/exploder.scr::explode 1 after the bomb hits . I might just use a trigger_multiple with heath set at the explosion point and see it that works . Or a trigger with monsters set in front of the plane .

hello

Posted: Tue Sep 30, 2003 7:10 am
by tltrude
I just told you how--see note between the two screenshots. The thread "kaboom_water", in mine, sets off an exploder (only an exploderfire entity). Here is the thread in the script:

kaboom_water:

exec global/exploder.scr::explode 4 // water plume

end

Any exploder stuff with #set 4 will go off when the bomb reaches the last node. In my map the next bomb path blows up an arch the same way.

Posted: Tue Sep 30, 2003 12:11 pm
by bdbodger
Well I have done all that can't find my error . thanks anyway will keep looking must be a typeo or something simple that I am overlooking I can explode it from script so I don't know why it is doing this .

e-mail

Posted: Tue Sep 30, 2003 2:33 pm
by tltrude
If you want another pair of eyes looking at it, you can send me the .map file (please zip it).

Posted: Wed Oct 01, 2003 9:45 am
by bdbodger
Thanks for looking at it . I finally found the problem I had

level.script = mymap.scr

when it should have been

level.script = maps/mymap.scr

Some times the simplest things can hang you up for days .

Thanks again