flypath problem

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
fuhrer
Captain
Posts: 253
Joined: Sun Mar 14, 2004 3:36 am

flypath problem

Post by fuhrer »

ok this is really strange, ive made a script object and some splinepaths, then told the object to follow that path but for some reason the object flips 180 before moving...its pissing me off :x

Code: Select all

train_prep:

	$train moveto $train_start
	$train speed 200
	thread go

end

go:
	$train_trigger waittill trigger
	$train flypath $train_path
	$train waitmove
	
end
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

angles

Post by tltrude »

Have you tried setting the angles for each path node? Not "angle", "angles.

Key: angles
Value: 0 0 0

if it is a train, then only the center number (yaw) needs to be set--unless it pitches up a hill, or rolls on a curve. You can also set angles on your train object, but "flypath" will make it use the angles of the path nodes. It will also "lookahead" 256 units for the next node and start changing its angles before it get to it.
Tom Trude,

Image
fuhrer
Captain
Posts: 253
Joined: Sun Mar 14, 2004 3:36 am

Post by fuhrer »

what exactly does the angles of the pathnode do?
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

If you are useing info_splinepath nodes the angles key is the angles the object flying the path will use at that node . It is used to do as TlTrude said to set the pitch yaw and roll of the object .
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

script_object

Post by tltrude »

I'm not sure it works for script_objects, but it does for models that fly the path. Maybe the script_object just needs key/value "lookahead 256" to make the node angles work, but not sure.
Tom Trude,

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

Post by bdbodger »

Well the plane in the global/bomber.scr and my strafeing script are both script_ models and my strafeing script lets you use a script_object as the plane they all use this system of node angles .
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Yes, but if you use a script_object you must be aware the game doesn't know what is the front of the plane and what is the back. Hence, you should design your plane in such a way (in Radiant) that the front of the plane is pointing to the right (angle 0). Alternatively, you could build it in an arbitrary direction and then add an 'angles' key pointing to the forward direction, i.e. if the front of your plane is at the 'top', then add key / value angles / 0 90 0.

:)
Image
Post Reply