change direction randomly in block

Post Reply
Cybertinus
Posts: 5
Joined: 01.10.2016, 08:09
Location: Noord-Brabant, The Netherlands

change direction randomly in block

Post by Cybertinus » 07.07.2019, 16:51

Hello all,

Currently I'm building my second layout ever in RocRail and my first one was a few years ago on a very simple layout. The issue I'm facing now is that I have a block which goes into a shed (block 4). When a train leaves this shed, it goes to the adjacent station (block 2). From that block it should be able to leave both ways, randomly (towards block 3 and 10). So the loco should swap direction. Currently it only continues into the same direction it used to leave the shed (so, towards block 10). And I'm at a loss on how to fix this.
I did find https://wiki.rocrail.net/doku.php?id=direction-en but somehow I'm not able to get this to work. The troubling line for me is "An action "loc swap" (1000ms timer) can be assigned to any block (with wait) and (under conditions, such as "counter = 3") cause a change in direction.". Where should I add this action? At the block? I can configure stuff for an action at a block, but I'm not able to get it in the table at the top (I go to this window via Tables -> Blocks... -> select the station block ("blok 2") -> tab "General" -> button "Actions..." in the "Configuration" section of this tab). Is this the correct location to do this?
Off course I've added the rocrail.ini and rocrail.000.trc to this topic.

What am I doing wrong? Or what extra information should I share so the problem will become more clear?

Kind regards,
Tijn
You do not have the required permissions to view the files attached to this post.

rjversluis
Site Admin
Posts: 42319
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Re: change direction randomly in block

Post by rjversluis » 07.07.2019, 17:20

Hi Tijn,

use this function to provide your data instead of picking some files which does not matter.
https://wiki.rocrail.net/doku.php?id=issue-en

Cybertinus
Posts: 5
Joined: 01.10.2016, 08:09
Location: Noord-Brabant, The Netherlands

Re: change direction randomly in block

Post by Cybertinus » 07.07.2019, 18:46

Hello Rob,

See the attached file.

Kind regards,
Tijn
You do not have the required permissions to view the files attached to this post.

smitt48
Moderator
Posts: 6111
Joined: 04.04.2014, 01:07
Location: Kralendijk, Bonaire - Dutch Caribbean

Re: change direction randomly in block

Post by smitt48 » 07.07.2019, 19:08

Hi Tijn,

You forgot to mention that this is a dinamo layout (see sensor table). Sorry, I don't know anything about it.

Tom

Post Reply

Return to “Automatic mode”