Jump to content

attaching trains to train trailers


Recommended Posts

  • 4 weeks later...
  • 2 weeks later...

If you had clicked on the link in his post, you'd see the issue is still new, eg this still hasn't been implemented.

attachElementToElement could work, but it doesn't because trailers aren't attached like that. Like when a train turns, the wagon needs move differently than just stuck on a defined offset.

Link to comment
  • 7 years later...

I have found the sollution:

attachTrailerToVehicle(train, wagon)

LocoMotive = createVehicle ( 537, 2865, 1340, 12.5 ) -- create a train(freight)
setTimer(
	function()
		trailer1 = createVehicle ( 569, 2865, 1340, 12.5 )    -- create the first trailer
		attachTrailerToVehicle ( LocoMotive, trailer1 )   -- attach them
		trailer2 = createVehicle ( 590, 2865, 1340, 12.5 )    -- create the second trailer
		attachTrailerToVehicle ( trailer1, trailer2 )   -- attach them
		trailer3 = createVehicle ( 569, 2865, 1340, 12.5 )    -- create the third trailer
		attachTrailerToVehicle ( trailer2, trailer3 )   -- attach them
	end, 50, 1)

I have created a train with 3 wagons.

 

Edited by Maarten
Link to comment
  • HAZJ locked this topic
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...