Page 1 of 1

Can a plane trigger a trigger?

Posted: Wed Mar 07, 2007 10:56 am
by Waylander76
i have a path of info_splinepaths for my plane to fly along which it does.

When the plane reaches a certain point along the splinepaths I want to trigger an event.
Can a flying plane trigger a trigger?

If so what sort of trigger and what are the properties I should be setting?

I've tried a trigger_multiple and a vehicle_trigger but to no avail.
I've tried giving one of the splinepaths a $setthread and that doesn't work
either.

Any help appreciated!

Posted: Wed Mar 07, 2007 12:11 pm
by bdbodger
The global/bomber.scr checks the distance the plane is from the splinepath node .

Code: Select all

while (local.range > 200)
	{
		local.oldrange = local.range
		local.range = vector_length (self.origin - $("bomberplane" + local.name).origin)
		wait 0.1
	}
Give your splinepath node a targetname then have that at the top of a thread that the splinepath node calls but not with setthread since it has to be doing it from the start while the plane is flying . When the plane gets in range the rest of the thread will run .

Posted: Wed Mar 07, 2007 12:58 pm
by Waylander76
bdbodger wrote:Give your splinepath node a targetname then have that at the top of a thread that the splinepath node calls but not with setthread since it has to be doing it from the start while the plane is flying . When the plane gets in range the rest of the thread will run .
Thanks for that Bd if i understand it correctly...

I have to give the splinepath node a targetname...I
eg...

targetname event1

In my script I have a thread that the splinepath node calls

eg...

plane_event_thread:
$event1
// do the rest of the stuff here
end

This is called in the main script just like any other thread?

level waittill spawn

thread plane_event_thread

Thanks again

Posted: Wed Mar 07, 2007 2:22 pm
by bdbodger
main:

level waittill spawn

$my_splinepath_node thread my_node_stuff

end

my_node_stuff:

local.range = vector_length (self.origin - $my_plane.origin)

while (local.range > 200)
{
local.range = vector_length (self.origin - $my_plane.origin)
wait 0.1
}

// plane in range now

// do what ever here

end

bomb

Posted: Wed Mar 07, 2007 2:38 pm
by tltrude
I have to ask, Is the event droping a bomb? Because, droping a bomb is done with a seperate spline path.

I have a tutorial map for bombing.

test_bomber
Image

Posted: Wed Mar 07, 2007 3:09 pm
by Waylander76
thanks BD :D

Tom no it's not dropping a bomb :D