waypoints executing threads?

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

waypoints executing threads?

Post by Master-Of-Fungus-Foo-D »

i think i remember from somewhere that there was a command that would make a waypoint node execute a thread when it was reached... is there one?

if there isnt, how could i make an info_waypoint execute a thread when it was reached?
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

The global/bomber.scr just runs a thread to check when the plane is near the node then checks for a setthread key being set and runs a thread in the level.script ( you have to set level.script = <map script name here> for it to work )

while (local.range > 200)
{
local.oldrange = local.range
local.range = vector_length (self.origin - $("bomberplane" + local.name).origin)
wait 0.1
}
....
....
....
if (self.setthread)
{
println ("Bomb from set " + local.name + " threading " + self.setthread)
$("bombdrop" + local.num) thread level.script::self.setthread
}
Image
Post Reply