Making a path_track choose a random path
Quote from hemotem on April 9, 2012, 4:35 pmI do not know if this is even possible to do but what I am looking at doing is having a path_track choose a random Next Stop Target what I have is a logic auto and a logic case to choose the randomness but getting the track its self to switch between 1 2 3 or 4 is the issue.
Any help would be appreciated.
Hemotem
I do not know if this is even possible to do but what I am looking at doing is having a path_track choose a random Next Stop Target what I have is a logic auto and a logic case to choose the randomness but getting the track its self to switch between 1 2 3 or 4 is the issue.
Any help would be appreciated.
Hemotem
Quote from Lpfreaky90 on April 9, 2012, 4:50 pmErm; you use a func_track train?
Use a relay for every case and let it movetonode <<name of the point>> that should work. I can't test it at the moment though
Erm; you use a func_track train?
Use a relay for every case and let it movetonode <<name of the point>> that should work. I can't test it at the moment though
Quote from hemotem on April 9, 2012, 4:56 pmthe train travels from point 0 to point 1 but stops at point 1. I will try using a relay and see if that works thanks
the train travels from point 0 to point 1 but stops at point 1. I will try using a relay and see if that works thanks
Quote from Lpfreaky90 on April 9, 2012, 5:26 pmhemotem wrote:the train travels from point 0 to point 1 but stops at point 1. I will try using a relay and see if that works thanksTrain travels from A to Random(path_1-6).
Just make the random output -> trigger the case; let the case trigger a relay.
Let relay_1 MoveToPathNode path_1
Relay 2: Ontrigger, Train, MoveToPathNode, path_2
etc. that should do it
Train travels from A to Random(path_1-6).
Just make the random output -> trigger the case; let the case trigger a relay.
Let relay_1 MoveToPathNode path_1
Relay 2: Ontrigger, Train, MoveToPathNode, path_2
etc. that should do it
Quote from hemotem on April 9, 2012, 7:31 pmIt tries to work it just keeps going to track_5 and back to track_1 and ignoring track_2 track_3 and track_4. I do not know if it is the logic_case or the logic_timer that is not choosing a proper random case
It tries to work it just keeps going to track_5 and back to track_1 and ignoring track_2 track_3 and track_4. I do not know if it is the logic_case or the logic_timer that is not choosing a proper random case
Quote from Lpfreaky90 on April 9, 2012, 9:31 pmAdd a logic_relay (relay1) that triggers the random case.
Let relay 1 trigger another relay (relay 2) with a delay of 5 seconds
Let relay 2 trigger relay 1 after a delay of 0.01 seconds; That's a cheaty way to do a timer and you can rule out if there's a problem with the timer
Add a logic_relay (relay1) that triggers the random case.
Let relay 1 trigger another relay (relay 2) with a delay of 5 seconds
Let relay 2 trigger relay 1 after a delay of 0.01 seconds; That's a cheaty way to do a timer and you can rule out if there's a problem with the timer
Quote from hemotem on April 9, 2012, 11:04 pmTimer was not it so something is the case_logic I am about ready to ditch this idea but it has me frustrated enough to continue on this will make the third day of trying to get this to work I have dug through valves and this great site along with Google and YouTube tutorials on all the elements and still not quite right.
If anyone has an idea on how to do this... train_1 starts at track_1 and has a random choice to go to track_2 thru Track_4 and back to track_1 again then resetting and choosing a different random track to take and back. Rinse and repeat.
In advance I thank you for any help.
Hemotem
Timer was not it so something is the case_logic I am about ready to ditch this idea but it has me frustrated enough to continue on this will make the third day of trying to get this to work I have dug through valves and this great site along with Google and YouTube tutorials on all the elements and still not quite right.
If anyone has an idea on how to do this... train_1 starts at track_1 and has a random choice to go to track_2 thru Track_4 and back to track_1 again then resetting and choosing a different random track to take and back. Rinse and repeat.
In advance I thank you for any help.
Hemotem

Quote from ChickenMobile on April 10, 2012, 2:35 amIf you didn't know: path_tracks have an alternate branch path option where you can enable and disable it based of inputs.
If you didn't know: path_tracks have an alternate branch path option where you can enable and disable it based of inputs.
Quote from hemotem on April 10, 2012, 3:19 amYes I even tried that a few times to get the result I wanted. but alas it did not work either.
A simplified design I wanted to use 8 points if I could get this right.
- Code: Select all
O3
|r
|e
|a
|l
|y
relay3 |2 relay1
O4-------------O1-------------O2
r |
e |
l | logic_case1
a |
y | logic_timer1
4 |
O5
O1 thru O5 are the path_tracksLogic_timer set to random time tied to the logic_case to fire the case. relay1 - relay4 set to on trigger MoveToPathNode track2 to track5, track2 to track5 are stet to next stop track1, since that did not work I ended up putting in MoveToPathNode track1 in track2 to track5 and it went to track5 and back to track1 repeatedly sometimes with a delay or an early switch in the movement from track1 to track5 and back.
That is the design I was looking for. but have hit a brick wall so to speak.
So anyone have an idea what I am doing wrong here?
Yes I even tried that a few times to get the result I wanted. but alas it did not work either.
A simplified design I wanted to use 8 points if I could get this right.
- Code: Select all
O3
|r
|e
|a
|l
|y
relay3 |2 relay1
O4-------------O1-------------O2
r |
e |
l | logic_case1
a |
y | logic_timer1
4 |
O5
O1 thru O5 are the path_tracks
Logic_timer set to random time tied to the logic_case to fire the case. relay1 - relay4 set to on trigger MoveToPathNode track2 to track5, track2 to track5 are stet to next stop track1, since that did not work I ended up putting in MoveToPathNode track1 in track2 to track5 and it went to track5 and back to track1 repeatedly sometimes with a delay or an early switch in the movement from track1 to track5 and back.
That is the design I was looking for. but have hit a brick wall so to speak.
So anyone have an idea what I am doing wrong here?
Quote from Robdon on April 10, 2012, 5:33 amHi,
See attached map...
Is this what you what it to do?
As far as I know, you need to have all the paths connected in a serial 'line' (just like a real trains tracks), so you cant just jump around so easily.
You need some 'fake' paths to teleport to before moving to the correct path.
Also needed is a 'fake' end path. This is because there is a slight bug with paths in that the 'end' path is always slightly offset compared to all the others, so a fake end needs to be there, but its never used really.
Not sure if there is an easier way, but that was how I've done it.
Rob.
Hi,
See attached map...
Is this what you what it to do?
As far as I know, you need to have all the paths connected in a serial 'line' (just like a real trains tracks), so you cant just jump around so easily.
You need some 'fake' paths to teleport to before moving to the correct path.
Also needed is a 'fake' end path. This is because there is a slight bug with paths in that the 'end' path is always slightly offset compared to all the others, so a fake end needs to be there, but its never used really.
Not sure if there is an easier way, but that was how I've done it.
Rob.