Home

> 4D Blocks

> Version 4

  Controls
  Settings
  Block Motion
  Examples
> Scene Language
  Kinds of Blocks
  Goals
  History
  Versions

  General Information
  Constants
  Geometry Commands
  More Geometry Commands
  Train Commands
> Elevated Train Commands
  Scenery Commands

Elevated Train Commands

Building an elevated track is extremely simple. All you have to do is add some ramps to your track using the "u" and "d" instructions and then say "1 N platforms" after all the track is built (where N is the number of vertical levels), and voila. Everything else is just styles and decorations.

Another way you can make an elevated track is by starting the track at nonzero y … 1 for the first level, 2 for the second level, and so on. The y coordinates for elevated tracks are always level numbers rather than physical heights.

Pylons

The first decoration you might want to add is pylons. To create a pylon, all you have to do is provide the coordinates of the top of the pylon (with y being the level number) and say "pylon". If you have multiple levels, don't worry, the program will look at the track underneath and try to figure out whether the pylon should go all the way down to the ground or just down to a lower level. In some situations the program might get it wrong, in which case you can override it with the "bpylon" command, which takes both a top point and a base level.

point pylon
point base bpylon

Actually I guess that's the last decoration too, because everything else is styles.

Vertical Track Parameters

The most fundamental thing you can adjust is the vertical track parameters. If you use the "newtrack" command they're set to default values, so you have to use the "newtrack2" command instead. It takes three arguments in addition to the already huge list of arguments that "newtrack" has.

  • The physical height of a level.
  • The physical ramp angle.
  • The radius of curvature to use at the start and end of the ramp.

The radius of curvature applies only to railcar motion. It doesn't produce any visible change in the shape of the ramps.

There are some constraints on these parameters, basically that the ramp angle has to be steep enough to get you to the desired height, but "newtrack2" will let you know if what you're trying to do is impossible.

Platform Style

platformstyle - There are currently four styles you can use.

PS_SQUARE     -- big square platforms
PS_ROUND -- big platforms with rounded corners
PS_THIN -- thin platforms
PS_THIN_ROUND -- thin platforms with rounded corners on simple curves

The last one is the default. PS_ROUND isn't supported in 4D yet, but it will be someday.

platformthickness - This lets you set the platform thickness. If you make the platforms really thick they'll go all the way down to the ground, which can be a nice effect sometimes.

platformwidth - This lets you set the platform width. (The width isn't used for square and round styles.)

platformcolor - This lets you set the platform color.

Ramp Style

If you want to have big triangular ramps like in the file "train2-ramp3b", but you don't want the other platforms to go all the way to the ground, you can turn on the ramptriangle option: "true ramptriangle".

Pylon Style

Pylons are polygonal columns. There are three pylon properties you can set.

pylonwidth - The actual column width, which is not the same thing as twice the polygon radius.

pylonsides - The number of sides.

pylonoffset - This is a boolean option (true or false) that tells how the polygons are aligned to the axes. By default (true) you get the same kind of polygons as with the "altpoly" command.

Manual Platform Creation

If you want all your platforms to have the same style, you can just set the style and then say "1 N platforms". If you want the style to vary by level, you can set the style for level 1, say "1 1 platforms", and repeat. But, if you want the style to vary within a level, you'll need to create at least some of the platforms manually. The system keeps track of which platforms have already been created, so you can create some platforms manually and then let "platforms" do the rest.

platform - This takes two position arguments, one that's a minimum and one that's a maximum. The command below, for example, will produce a 2x2 level 1 platform that covers grid positions (2,1,5), (3,1,5), (2,1,6), and (3,1,6).

[2 1 5] [3 1 6] platform

In the two PS_THIN styles, a platform can only cover more than one grid position if the track on the platform consists of one straight piece.

For making platforms that cover only one grid position, you can use the "dup" command to duplicate the array, like so.

[2 1 5] dup platform

rplatform - This takes the same two array arguments plus a four-digit binary number that tells which corners should be rounded. (You can use a % prefix to type binary numbers.) The digits control the NE, NW, SW, and SE corners respectively, so for example "%0100" would make the platform be round in the northwest corner only.

ramp - This takes one argument, the grid position of the ramp. You can give the position of the top end or the bottom end, but if you use the top end, don't forget to increase the y coordinate.