Flex Doors


(Stektr33) #1

Hi, I’ve done my share of searching and has turned up empty on this site. Actually, Im surprised how nobody has asked this question yet.

How do you make doors flex while it’s being opened like the garage doors in Fuel Dump. I’m pretty sure this is just all in scripting, but I’m not sure how. I’m new to ET mapping so pardon me in advance if this is implemented simpler than I think.

Thanks.
teh tr33


(G0-Gerbil) #2

From what I gather it’s a series of script movers that are controlled individually.

Each moves forward, rotates, then moves down, just with an offset from the one in front so they look like they act as one complete item.

I would imagine their origin brushes are actually below the brushes themselves making up the bits of doors, that way you only have to rotate them to make them look like they go around the corner, not move and rotate them.


(Stektr33) #3

thx gerbil.
I think that makes sense that they’re a series of script movers. Come to think of it, do you think they’re just script movers with a defined path? I’m gonna go mess around and make one.


(G0-Gerbil) #4

For each section you’d need 2 distinct path_corners - 1 for it’s start place and one for it’s end place.
Then all of them would share a common path_corner that’s at the position they’d all rotate.

So for each section youd:

Move it from start to rotate position
rotate 90 degrees
move from rotate position to end place

Note that they’d all have to move at the same speed, and you’d have to work out how quick to make them rotate (could use trig but prolly best to guess for now ;)).
However, cos they all move a different distant, you’d start them all at once, but they’d move for a different amount of time before rotating etc.

Just looked, that’s not how they do it in fueldump, they use attachtotrain, which I’m not familiar with though, so if you want to copy exactly how they did it, I can’t really help, but the way we’ve covered above should work.


(Stektr33) #5

Ok ive almost gotten this to work, actually on I’m on the verge.
I just have a few headaches to mend. Ok here it goes.

I went with using the spline system so I can use controls to make a bezier, instead of using paths. I reviewed fueldump.script and they’re using attatchtotrain for each of the panels, and then just script ONE panel for the movement. The rest of the panels follow. My problem is that I can’t use just one spline because the curve produced by the control makes the panels sit at an angle when at the close position. But when I use two splines, I get a wierd rotation (90 on the X-axis, I believe) when the panel jumps from the first spline to the second. Not that I already have to deal with the initial wierd rotation with splines, I have to deal with this second one. I did some test, and when I have the second spline perfectly vertical just like the first one (btw, the first spline patch is the vertical one going up), then it doesn’t rotate. When I have the second spline at the even the slightest angle (imagine a garage door system looking at it from the side) then it rotates. I have some screenshots. Fuel Dump doesn’t seem to be compensating for it via script so I’m not sure how they’re doing it, but I know it’s using splines as well. Sorry for the long spiel, but Ive been banging my head on the table since yesterday morning trying to get my n00b garage door to work. Here are the screenies showing you my (now) mangled map. Notice the second spline (top spline) is at a slight angle and look at it in the game when it’s raised.

(please don’t mind the panel on the left, it’s not part of what I’m trying to show)

this one shows an over-exaggerated view of what I’m trying to do with my splines


here’s the panel on the first spline


here’s the panel on the second spline, notice the rotation.

I apologize for the dark screenshots, I tried to brighten it up already :confused:

Oh, another thing, what are the parameters for attatchtotrain, and how come it’s misspelled. Here’s what I see in fueldump.script


tbdoor1-8
{
	spawn
	{
		wait 100
		attatchtotrain tbdoor1-9 16
	}
}


(sock) #6

The flexi doors use a train system which was developed for another map which did not make it. While experimenting with prefabs we created a flex door system using it and glued it into fueldump.

The system use one primary “script_mover” entity and the rest are all connected in serial. (like beads on a piece of string) The “attatchtotrain tbdoor1-9 16” has 2 parameters. 1. Specifies the “script_mover” entity to attach to. 2. Length of train/section which is being attached.

In fueldump the sections are 16 map units high and have to be in a set position on the map. Because of the limitation of the train system having to be a certain rotation, they where created in a seperate section of the map and moved in via the script.

The movement of the sections (or train as ET likes to call it) are done via info_train_spline entities. The flexi doors go up, curve round and then roll back. But as you probably found out it can cause a glitch where the door sections seem to do a 180 degree turn at either end point. To get round this you have to the “info_train_spline_main” entities not directly in line with each other. By having a slight angle on the end spline points the flexi door do not do strange twists. Check the fueldump map and you will see the flex doors slightly curve in/out when open/closed.

lol, I had never noticed it before. I’m sure its a spelling mistake.

Sock
:moo:

The sections of the train then follow a spline


(Stektr33) #7

Suhweet, I’ll try that when I get home.
Thanks Mr. Sock.

Oh and about your comment that you have left your mark on fuel dump…has someone gotten that yet? If not, is the ‘mark’ something that we would only be able to find IF we knew some background about you?

:blah: