|
Post by smokeyfulton on Nov 5, 2011 5:48:34 GMT
Ok I understand the basics in parenting objects from the start or a map spawn and to kill parent and all that good stuff but I'm stuck on a problem opportunity lol...
My map layout has a tram like on HL1 (INBOUND). I have all the path_track(s) set up according to the path I want it to move in and it works quite well in corners and strait sections but i wanted to incorporate a "turntable" in the track section to rotate the tram car 90 degrees and continue along a track running perpendicular to the main track.
The tram car is a Func_tracktrain named "bob" the turntable is a func_door_rotating named "RotatingTrack"
When "bob" reaches the path_track above "RotatingTrack" I am trying to parent "bob" with "RotatingTrack" ("RotatingTrack" being the parent) After it is parented I want "RotatingTrack" to OPEN and rotate "bob" 90 degrees then continue "bob" along to the next path_track.
The tram car will rotate when it gets to this point on my testing but it is a fast rotate since it is set to point at the next path_track once it reaches the desired path_track... I want it to slow it down and make it seem to be spun with the turntable to make a more realistic spin.
I played around with the SetParent settings but i couldnt get it right.
So basically i need to set a parent to the the func_tracktrain and spin it then remove the parent and resume to let it go on its way.
Any Help would be greatly appreciated Thanks
|
|
|
Post by smokeyfulton on Nov 6, 2011 0:47:23 GMT
Here is a test map I made if anyone wants to fool around with it Attachments:
|
|
|
Post by Zeph on Nov 6, 2011 1:51:57 GMT
You#'ll need to re-connect the paths. I think paths can have "alternate routes", so you can connect the turntable path to two other paths, and trigger (when the table turns) to change path when the train rotates. This should "snap" the train to the path, which is now in the same direction as the train was after rotating. You should be able to parent via commands, setparent, etc. perhaps a door isn't the best option, try func_rotating, or maybe even a button_rot. Failing that, a developer.valvesoftware.com/wiki/Func_platrot may work.
|
|
|
Post by smokeyfulton on Nov 7, 2011 2:58:09 GMT
Ok I got the parenting to work last night at like 3am... and the alternate path is what i needed (known as branch path) thanks... here is my .vmf if u would like to look Attachments:
|
|