setthread in bomber.scr

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

setthread in bomber.scr

Post 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
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

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

Post 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
}
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Tutorial map

Post 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
Last edited by tltrude on Tue Sep 30, 2003 7:38 am, edited 2 times in total.
Tom Trude,

Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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 .
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

hello

Post 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.
Tom Trude,

Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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 .
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

e-mail

Post by tltrude »

If you want another pair of eyes looking at it, you can send me the .map file (please zip it).
Tom Trude,

Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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
Post Reply