Curt84328 Posted December 4, 2021 Share Posted December 4, 2021 I am trying to store a variable (Current speed) read from a certain train. I want to read the current speed of the locomotive at all times and then store it as a variable and check to see if the current speed is not 0. If it is not, I plan to trigger a series of events. Unfortunately I am still on V6. I can read the speed, but not check to see if it is zero. Regards Curtis Link to comment Share on other sites More sharing options...
BahnLand Posted December 4, 2021 Share Posted December 4, 2021 Hello Curtis, vor 21 Minuten schrieb Curt84328: I can read the speed, but not check to see if it is zero. Click to enlarge the picture Many greetings BahnLand Link to comment Share on other sites More sharing options...
Goetz Posted December 4, 2021 Share Posted December 4, 2021 vor 25 Minuten schrieb Curt84328: I want to read the current speed [...] and check to see if the current speed is not 0 Hello Curtis, This is not what you asked for. And Bahnland gave you the appropriate answer. But still ... Would it help you to know that a train which stops can trigger a dedicated event? Greets Goetz Link to comment Share on other sites More sharing options...
Timba Posted December 4, 2021 Share Posted December 4, 2021 Hello @BahnLand please allow me a tiny correction. Curtis asked for a solution to see if the speed is not 0. Your solution wouldn't work with trains reversing (current speed < 0). Therefore it should be rather like this: Viele Grüße Timba Link to comment Share on other sites More sharing options...
Curt84328 Posted December 5, 2021 Author Share Posted December 5, 2021 I tried Bahnland's suggestion, The events do not seem to be activating If I manually activate the steam jets and then stop the train, It does stop all the jets. I had it at one point, but am stumped. Curt Link to comment Share on other sites More sharing options...
Timba Posted December 5, 2021 Share Posted December 5, 2021 Hi Curtis, Bahnland's suggestion is not working because the event is not triggered. A user-defined event needs a call. For instance, you could use a timer, set to 1 sec and 'automatic restart' set true. That will give you a tick every second. Next you use the event 'timer expires' and put the code in there, instead of a user-defined event. Hope that helps. Best regards Timba Link to comment Share on other sites More sharing options...
Curt84328 Posted December 5, 2021 Author Share Posted December 5, 2021 14 hours ago, Timba said: Hi Curtis, Bahnland's suggestion is not working because the event is not triggered. A user-defined event needs a call. For instance, you could use a timer, set to 1 sec and 'automatic restart' set true. That will give you a tick every second. Next you use the event 'timer expires' and put the code in there, instead of a user-defined event. Hope that helps. Best regards Timba It does indeed help. I got it to do just what I wanted. I used two timers of 2 seconds, offset by one second so that a timer expires every second. I set up 2 timer expires events with one for each timer. Condition was as everyone has said except condition, not event. One timer shuts off the front jets, and starts the back jets. The other times turns on the front jets and shuts off the back jets. Here the Back Jet is shutting off and the Front Jet is opening. Much thanks and regards Curtis. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now