It is currently 21 Nov 2024, 14:29

WELCOME TO SIMUSCAPE!


Please Sign in or Register to enable all features, remove restrictions and gain additional access!
For information on how to bypass the CAPTCHA or to contact Team Simuscape, Continue Here!


Post a new topicPost a reply Page 1 of 1   [ 2 posts ]
Author Message
PostPosted: 25 Oct 2018, 10:45 
Player
Player
User avatar

Joined: 06 Mar 2012, 21:55
Posts: 480
Location: The Netherlands
Discussion thread for the Railtype Templates in NML Tutorial, that can be found here:
http://www.simuscape.net/simutalk/viewtopic.php?f=85&t=898


Top
 Offline Profile  
 
PostPosted: 25 Oct 2018, 11:01 
Expert
Expert
User avatar

Joined: 03 May 2015, 03:27
Posts: 1716
Location: Newcastle, Australia
With the new design of how to do fences for track .. each side is a separate fence .. this has allowed me to add more graphics to the tracks.

In this case I added a road to run between the fence and the railway tracks. This road is a to allow access for Fettlers to carry out track repairs.
Attachment:
GravelTracks-2.png
GravelTracks-2.png [ 177.74 KiB | Viewed 3708 times ]

This is the default template for the roads. Replace the grey with the road surface you want and can also add what fence design you like.
Attachment:
Fences_RAIL.png
Fences_RAIL.png [ 5.61 KiB | Viewed 3708 times ]

The code for these fences and roads is.
Code:
//Fences
template template_widefences() {
   //left_x, upper_y, width, height, offset_x, offset_y
   [  2,  5, 38, 26,  -33,  -7] //Back of Track
   [ 50,  5, 38, 26,   -3,  -7] //Back of Track
   [ 98,  5,  10, 38,  -7, -22] //Right of Track
   [114,  5, 65,  10, -31,  -6] //Bottom of Track
   [194,  5, 38, 19,  -33,  -8] //Back of Track (slope)
   [242,  5, 38, 19,    -4,  -8] //Back of Track (slope)
   [290,  5, 39, 35,  -33, -16] //Back of Track (slope)
   [332,  5, 39, 35,    -4, -16] //Back of Track (slope)
   [  2, 50, 38, 26, -35,  -10] //Front of Track
   [ 50, 50, 38, 26,   -1,  -10] //Front of Track
   [ 98, 50,  10, 38,   1, -22] //Left of Track
   [114, 50, 65,  10, -31,  -6] //Top of Track
   [194, 50, 38, 19,  -35,  -11] //Front of Track (slope)
   [242, 50, 38, 19,   -1,  -11] //Front of Track (slope)
   [290, 50, 39, 35,  -35, -19] //Front of Track (slope)
   [332, 50, 39, 35,   -1, -19] //Front of Track (slope)

}


Hope these be useful to you all.

_________________
All my projects are GPLv2 License.
Soot Happens.
Projects: viewtopic.php?f=179&t=811


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 2 posts ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


Status SimuscapeTerms of UseAbout Simuscape

Design by SAC © 2012-2015, Sweden • Powered by phpBB • Based on twilightBB by Daniel St. Jules