Two or more triggers, triggered in order?

Davie_UCF

Here since 2001, Trainz!!
How do I make two or more triggers work in order? So you could define the direction a train has to go over triggers to set a junction..

If you have two, it has to hit the first one then second..

I tried this using ordered list then
-trigger1
--trigger2
---setjunction

And i'm sure when I drove backwards and hit trigger 2 then trigger 1 it still worked.. should this work or am I doing it wrong?

thanks
David
 
This kinda works but I have an issue and I Wonder if anyone can help me out.

When driving one direction it works and the junction is unaffected.. the other way it changes.. yet

If I drive the train out past both triggers then stop, then reverse, it hits the first trigger and the junction changes derailing the train..

Why?! Its the first trigger and isn't the second trigger meant to be hit before it moves onto the set junction? why does driving one way then back again ruin it?
 
I think Andi06 had a trigger he was playing with that only worked when a train approached from one direction. He the one to ask.
 
Thanks Stagecoach:)


Something else, I remember reading trigger rule was not the one to use, trigger check was newer and should be used, however I tested my problem above with trigger rule and all works fine, yet with trigger check it fails!?

Thats an odd one!
David
 
I'm still experimenting with mine, but I do remember that "trigger check" had a check for "apply only when approaching" or such.
 
Don't know which thread to use, but I'll stick to this one now :hehe:

After some experimenting, I found that the "ordered list" just screws up things. I made a circle for the test train to run round on. It works the first time around, but after that the trigger-rules basically do whatever they feel like, sometimes switching sometimes not, sometimes when the train is nowhere near.

But when I skip the list and just set up a trigger-check + set junction (one for each step I need performed, it works. Had the train running round the circle a number of times, and it works everytime, switching the junction to "open main" position on the first trigger, then switching the junction back to "closed main" on the second trigger, and so on.

Here's how it looks: (I used a visible junction this time, so I can actually see what it's doing in Driver, but that makes no difference)

In surveyor:

trig4.jpg


"trigger south" turns the junction (to the right) to open the line
"trigger south end" turns the junction (to the left) to close the line

trig5.jpg


trig6.jpg


Now I need to go back and add triggers for the opposite direction, should prove interesting.
 
Oh, I forgot this:

trig7.jpg


This is the checkmark I was talking about. I have this checked, and I turned the train around and backed into the trigger, and that works, meaning that nothing happened.

Wasn't that what you were after?
 
Hmmm, this only works in one direction. The triggers don't care which direction I go (north or south) as long as the train is heading forwards. That kinda screws up my setup here. Back to the drawing board.
 
Jytte, Davie (re your mail). Yes I do have a directional trigger but its quite specialised and won't do what you want. If you let me know the KUID of the trigger asset that you are using I will have a look to see if it can be modified.
 
Interesting, I thought you had to have ordered list, I don't understand how it messes things up.. why would it, thats a pain.

Thanks Andi, i'll take a look.
 
Jytte, Davie (re your mail). Yes I do have a directional trigger but its quite specialised and won't do what you want. If you let me know the KUID of the trigger asset that you are using I will have a look to see if it can be modified.

I'm just using the built in trigger check and trigger rule (oddly sometimes the trigger check does random things yet the trigger rule doesn't)... sorry I don't know the kuid right this second but i'll get back to you if you need it.
 
Andi, I'm using the built in trigger as well.
It's kuid:-1:6132 (Auran)
You think it can be modified?
 
Hmmm, this only works in one direction. The triggers don't care which direction I go (north or south) as long as the train is heading forwards. That kinda screws up my setup here. Back to the drawing board.

Would this idea work?
Set up as a passing loop ie a piece of double track (Yes, double) with yellow direction markers to force trains to always take the left hand (or right if you prefer) route. Set up triggers and junctions on each track for the relevant direction. When you're happy this works for both directions, replace one of your tracks with invisible track, and while holding down shift, drag the invisible track so it's exactly over the other. To AI, your trains will only be going one way on each track, but will look as if they are following the single line...
Just a thought, but if you're having trouble with making it work both ways its worth a try. But you may end up with AI sending two trains in opposite directions and they may appear to be passing through each other...
 
Hi davidbird, thanks for your input.

I can see what you're saying. That's a nifty solution. But, I'm mainly intending this route to be driven manually, but I still don't like to make something that will be AI-"unfriendly".

For this particular project, I have done some re-thinking. This part of the line, and the bridge, should probably be 2-tracked anyway, so I'm going to change the whole area. This will eliminate the problem for now, since this works just fine for one direction.

There still could be other instances where you DO need a trigger that will work "one way only", so I think we really need a directional trigger for Trainz.

As for Davie's original question; I'm still puzzled at the fact that the "ordered list" does not work as intended. Even when set up to "run forever", it can be counted on to work only once, and from then on it's anybody's guess what happens.
 
What you need is an alternative Trigger Check rule which allows you to match the train's direction of travel to the direction in which the trigger is placed on the track. It might be helpful to have a trigger asset with a directional arrow but this isn't essential.

This isn't difficult but I'm very tied up at the moment so it will take a while. If you can get anyone else to take it up all that is needed is a rewrite of the DirectionalCheck() method in triggercheckrule.gs.
 
That would a rule that doesn't exist at the moment? At the present the rule does not care.

When you say "direction in which the trigger is placed on the track" I get lost, because there's no way of telling which way that is. That trigger looks the same no matter what, and when rotating it there's no way of telling IF it rotates or not, OR to which direction, since it looks all the same.
 
The trigger has a 'direction' nonetheless and this can be used to make the rule do what you want. Its easy enough to make a trigger with a different mesh that will show its direction visually.
 
Good point. I have so many things on my plate with my route, so that may be beyond me, and at the moment I wouldn't know how to make a rule.

Any volunteers with a little time on their hands interested in this issure?
 
Back
Top