Autodrive

by Pi-C

Car equipment for train avoidance, logistic network integration, circuit network connectivity, fuel refill, ammo reload, vehicle repair, radio control, enemy targeting, and gate control.

Content
2 months ago
0.17 - 1.1
2.98K
Transportation Combat Logistic network Circuit network

g Circuit control -- moving to 0,0

5 years ago
(updated 5 years ago)

How do you send a car to position X=0, Y=0? This shouldn't work due to the way Factorio processes signals: every signal that has a value of 0 is treated as if it wasn't set at all.

Just tested: If (X = 0 AND Y != 0) OR (X != 0 AND Y = 0), the car will be sent to that position. I guess because one signal has a value, it will be inferred that the absence of the other signal actually means it has a value of 0. But that really doesn't work if both are 0.

Two ideas how to solve this:
- Adapt the mod. If at least one of X and Y had a value other than 0, and input changes so that both X and Y are 0, move the car to 0,0. Potential problem: You really don't know whether the player intended to send the car to 0,0 or whether he shut off the circuits to stop the car from automatic driving. Perhaps this isn't such a good idea after all.
- Let the player take care of it. A filter that sets X, or Y, or X and Y to 1 just before the signals are fed into the radio should usually do the trick. Potential problem: the modified location is blocked by a building, water, or a cliff, so it's impossible to path there.

Any ideas how to handle this case? :-)

5 years ago

Don't go to 0,0.

5 years ago

Right, may be that should be mentioned on the info page? I knew that 0,0 would cause trouble. But sometimes, things go wrong (constant combinator accidentally turned off etc.), so I wanted a fallback. Turns out, my approach was buggy as well -- so my "fix" resulted in moving the car off the designated route and effectively stopping it forever. :-)

5 years ago

Ok, good point. Noted on the info tab.

5 years ago

Thanks!

New response