A Portal question

lenscab

New member
Hi,,, Is it possible for train a to go into portal a and come out of portal b, and train b to to go into portal a and come out of portal c please.?
Len
 
No, as the portal only has one selection for the return portal name. In my case, I place portals around the route that sends trains to portals on a baseboard set some distance away. This baseboard will have the incoming portals and they will link by track to returning portals which send trains back to portals around the route.
 
Thanks Keith,, it was just a shot in the dark,, I didnt think so myself but Ive been known to be wrong, ha.
Len
 
Hi Len,
you may want to use/test Pitkins's rule <kuid:121843:100602> InstantMoveTrain
no need for portals but it can move a train to a trackmark
 
A work-round is to use two or more portals. Using a portal basic or portal basic short, couple it using invisible track to an invisible set of points a short distance in front of your existing portal. Once coupled, set up the new portal rules then align it with and on top of the existing portal track. The invisible track will make the portal it is coupled to invisible once in use and on the condition they are aligned, whichever portal the train is routed to it will appear running correctly on track.

I tend to use tunnels with portals inserted inside them at the extreme ends of my routes, first to turn back traffic, but also to enable me to extend my route in the future by completing the other end of the tunnel, adding more baseboards and so forth. Peter
 
Hi Len,
you may want to use/test Pitkins's rule <kuid:121843:100602> InstantMoveTrain
no need for portals but it can move a train to a trackmark

I've replaced some of the portals on my layouts with straight lengths of plain track and trackmarks to make use of Pitkins rule. It works very well whether it's used for sending a train right across the layout or to a neighbouring track. It can be used for turning an entire train around from end to end as well.
 
Hi,,, I tried the instantmove and I would like to use it, so I did a very small test route.
I put down a length of track, some way along I put a trackmark 1 and further along trackmark 2. and TM3
The trackmarks are in the direction I want the train to go.
I did the commands,,, drive to TM 3,, IMT to TM 1, and Drive to TM 2. Repeat
It gets to TM 3 makes a beep and just goes back and forward between 2 and 3. It seems to bypass the IMT command.
Any help please.?
Len
 
I put down a length of track, some way along I put a trackmark 1 and further along trackmark 2. and TM3
The trackmarks are in the direction I want the train to go.
I did the commands,,, drive to TM 3,, IMT to TM 1, and Drive to TM 2. Repeat
It gets to TM 3 makes a beep and just goes back and forward between 2 and 3. It seems to bypass the IMT command.

I have used the InstantMoveTrain command and its works perfectly.

A question I have, and the answer may be obvious but is not clear from your description.

The destination trackmarks have to be named "MOVETRAIN_0", "MOVETRAIN_1", etc to "MOVETRAIN_19". Not certain if the names must be in capitals but why tempt fate? Have you actually named your trackmarks this way? Your description simply uses IMT (which I am assuming means "InstantMoveTrain") to "TM 1"?
 
Big thanks for that,, that is what the problem must be because I had them named as trackmark 1,, 2 ,3 etc.
Looking forward to using it now, I can see it being very useful.
Len
 
I have used the InstantMoveTrain command and its works perfectly.

A question I have, and the answer may be obvious but is not clear from your description.

The destination trackmarks have to be named "MOVETRAIN_0", "MOVETRAIN_1", etc to "MOVETRAIN_19". Not certain if the names must be in capitals but why tempt fate? Have you actually named your trackmarks this way? Your description simply uses IMT (which I am assuming means "InstantMoveTrain") to "TM 1"?

The driver command looks for trackmark names exactly as described. I am doing this in my driver commands to avoid the issues that are now cropping up with hundreds or thousands of trackmarks, and thus having the commands timing out.

Since the menu only allows these names, I don't see how you could be setting up this scenario to begin with.
 
Last edited:
The driver command looks for trackmark names exactly as described. I am doing this in my driver commands to avoid the issues that are now cropping up with hundreds or thousands of trackmarks, and thus having the commands timing out.

Since the menu only allows these names, I don't see how you could be setting up this scenario to begin with.

The InstantMoveTrain command is intended as an alternative to using portals. The command allows you to use 20 different destinations (i.e. 20 different "exit portals") and a theoretically unlimited number of trackmarks that can act as "entry portals". How many portals would a route need? The routes that I have seen that use portals have only one or two, rarely more. Why would you need hundreds or thousands of trackmarks (presumably most for the purpose of the InstantMoveTrain command)?

Perhaps you are not using trackmarks as efficiently as possible or are using them for purposes that they are not designed for?

A tip. I find it useful to place trackmarks, triggers, etc that are only specific to a particular Session in the Session Layers, not the Route Layers. That way the number of trackmarks and triggers that have to be in a Route (and therefore needed by ALL Sessions) can be kept to a minimum.
 
The InstantMoveTrain command is intended as an alternative to using portals. The command allows you to use 20 different destinations (i.e. 20 different "exit portals") and a theoretically unlimited number of trackmarks that can act as "entry portals". How many portals would a route need? The routes that I have seen that use portals have only one or two, rarely more. Why would you need hundreds or thousands of trackmarks (presumably most for the purpose of the InstantMoveTrain command)?

Perhaps you are not using trackmarks as efficiently as possible or are using them for purposes that they are not designed for?

A tip. I find it useful to place trackmarks, triggers, etc that are only specific to a particular Session in the Session Layers, not the Route Layers. That way the number of trackmarks and triggers that have to be in a Route (and therefore needed by ALL Sessions) can be kept to a minimum.

You are preaching to the choir, I wrote the command:D. I actually wrote it so I could skip around in very long routes (which I sometimes find tedious). Of course it has other uses. Insofar as trackmarks, I was referring to routes of other creators. I remember one Texas route that had hundreds of trackmarks. The game has to build the menu when a driver command is instantiated, and the items grow geometrically. I develop sessions mostly for the routes of others, so I must avoid placing trackmarks in the route layers. The number of trackmarks available for the InstantMoveTrain driver command is set arbitrarily in my code, and can be increased. But again, timing out must be considered (although no one seems to have parameters to work with).
 
Hi,,, I tried the instantmove and I would like to use it, so I did a very small test route.
I put down a length of track, some way along I put a trackmark 1 and further along trackmark 2. and TM3
The trackmarks are in the direction I want the train to go.
I did the commands,,, drive to TM 3,, IMT to TM 1, and Drive to TM 2. Repeat
It gets to TM 3 makes a beep and just goes back and forward between 2 and 3. It seems to bypass the IMT command.
Any help please.?
Len


Make sure there is plenty of room for the train you are using. I believe I placed call outs to the driver messaging area that may tell you if it doesn't like something. Ultimately, the command makes an API call to place an array of vehicles at a trackmark, so it is up to the system at that point. You could try looking at the debug console output. I never tested the command using a repeat loop. As with all my creations, you have free license to modify them as you see fit.
 
You are preaching to the choir, I wrote the command:D. I actually wrote it so I could skip around in very long routes (which I sometimes find tedious).

Of course, I should have checked. A day or two ago I added your command to the Trainz Wiki Driver Command List, with your name included. DUH!

Insofar as trackmarks, I was referring to routes of other creators. I remember one Texas route that had hundreds of trackmarks. The game has to build the menu when a driver command is instantiated, and the items grow geometrically. I develop sessions mostly for the routes of others, so I must avoid placing trackmarks in the route layers. The number of trackmarks available for the InstantMoveTrain driver command is set arbitrarily in my code, and can be increased. But again, timing out must be considered (although no one seems to have parameters to work with).

Well done!
 
How many portals would a route need? The routes that I have seen that use portals have only one or two, rarely more.

The UMR2021 has 3 portals at the ends of the Mainline and portal at the end of the branches. I think its 9 or 10. Some portal consume train to the same portals others go to portals on the other side of the route. Mainline is 302 miles long. Some products are produced on one end and consumed on the other end, you can either run down the main or go through the portal nearer your destination. I can see where you could do the same thing with the InstantMoveTrain command

Rob
 
Hi Pitkin,

I'm switching a number of portals to your InstantMove Command.
But I notice that a train set consisting of 2 times 2 train cars back to back (Forward-Backward-Forward-Backward) result after the move in (Forward-Backward-Forward-Forward)
Is it something I do wrong, or is there a flaw somewhere.
Thanks
 
Correct Frank, studied the script and it lacks a direction check for vehicles
I have added it and send it to pitkin, he can give the final ok and release it if he wants.
 
Bedankt G.M. (Thanks)

By the way, congrats with your efforts around the conditios rule. But i can"t see the trainz list. Probably because I run about 100 trains in my session. Am I correct?
 
Had contact with pitkin, he is not into scripting atm.
He has given me permission to edit and release it as
InstantMoveTrain2 <kuid:99999:80009>


The original on the DLS works in SP2 and SP3 but not in older versions of TRS19
this has been corrected.
A directional check and placement has been added to make sure your train is the same on moving
so trains that have a few vehicles with opposite direction will stay as they should be.
Many current DMU and EMU have a rotated end vehicle, they should work now also using this.
Also instructions have been added readable in CM.
I propose you test it and if needed I will put it on the DLS (but only after confirmation it is ok for all)


here is the updated InstantMoveTrain2
have fun testing
 
Back
Top