Difficulty with Variables in Scenario [SOLVED]
[SOLVED]
I'm 99% sure this is an operator error but I'm so frustrated I bought another 2 pack of cigs.
GOAL: I want to increase points while the loco is moving and not increase points while it's stopped.
I have the Custom HUD displayed so I can see the variable "running"
I'm using two "Wait on Train Start/Stop" rules. 1st rule is setup to assign a 1 to the variable "running" when the loco is moving. The 2nd is setup to assign 0 (zero) to "running" when the loco stops. Both are setup to watch for a specific train... "MOW crane truck BNSF 1".
When I start and stop the loco, the variable display in the HUD correctly shows "running" changing from 0 to 1 and back again.
My problem is with the Variable Check rule. I have it in the Root position, under the two "Wait on Train" rules. It's setup to check if "running" is equal to 1 and evaluate the condition every second.
Indented under that is Variable Modify Continuous which is setup to add 1 to "ranking_points" every 1 seconds.
When I start the loco, the points increase. When I stop the loco, the points CONTINUE to increase. I also had a Check Variable to look for "running" to be equal to 0 and add 0 (zero) points to "ranking_points". That didn't work either.
I hope I explained this well enough, I'm at my wits end
Thank you
Joe
[SOLVED]
I'm 99% sure this is an operator error but I'm so frustrated I bought another 2 pack of cigs.
GOAL: I want to increase points while the loco is moving and not increase points while it's stopped.
I have the Custom HUD displayed so I can see the variable "running"
I'm using two "Wait on Train Start/Stop" rules. 1st rule is setup to assign a 1 to the variable "running" when the loco is moving. The 2nd is setup to assign 0 (zero) to "running" when the loco stops. Both are setup to watch for a specific train... "MOW crane truck BNSF 1".
When I start and stop the loco, the variable display in the HUD correctly shows "running" changing from 0 to 1 and back again.
My problem is with the Variable Check rule. I have it in the Root position, under the two "Wait on Train" rules. It's setup to check if "running" is equal to 1 and evaluate the condition every second.
Indented under that is Variable Modify Continuous which is setup to add 1 to "ranking_points" every 1 seconds.
When I start the loco, the points increase. When I stop the loco, the points CONTINUE to increase. I also had a Check Variable to look for "running" to be equal to 0 and add 0 (zero) points to "ranking_points". That didn't work either.
I hope I explained this well enough, I'm at my wits end
Thank you
Joe
Last edited: