Can a plane trigger a trigger?

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

Moderator: Moderators

Post Reply
Waylander76
Sergeant Major
Posts: 122
Joined: Wed Jun 01, 2005 10:03 am

Can a plane trigger a trigger?

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

Post 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 .
Image
Waylander76
Sergeant Major
Posts: 122
Joined: Wed Jun 01, 2005 10:03 am

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

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

bomb

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

Image
Waylander76
Sergeant Major
Posts: 122
Joined: Wed Jun 01, 2005 10:03 am

Post by Waylander76 »

thanks BD :D

Tom no it's not dropping a bomb :D
Post Reply