Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Jumper cable coming loose causes brief loss of vehicle control #25548
If the player is driving a vehicle connecting to something else by jumper cable, and the jumper cable becomes overextended and breaks loose, the player briefly loses control of the vehicle. It's similar to what you would experience if you hit the "wait" key several times in a row: you cannot steer the vehicle, and instead continue forward at whatever speed cruise control is set at.
Yup, I can confirm with a quick code read at
This should only ever happen while you're carrying the cable yourself:
It's consuming 30 or 200 moves every time the cable is reset, regardless of how extended it was (this should nominally translate to about 0.3/2 turns, but depends on character speed). A nicer solution would be to use
Someone should definitely double-check that consuming
Not really; I don't recall exactly what I was thinking at the time, but I'm pretty sure it was simply an expedient solution (as distinct from correct).
The vision was that, after affixing the cable to something, you would walk away (holding the other end of the cable, and paying it out) until you got too far -- at which point, the fixed end of the cable will have gotten disconnected[*] and you would have a cable dragging on the floor behind you.
Since I didn't want to deal with simulating a dragged cable, I forced the player character to reel it back in and/or coil it up, which obviously had to consume some moves.
So imagine the player with a cable snaking behind them, getting into a car (presumably making sure to put the cable through the car door's window, so they can shut the door) and driving off. The cable keeps paying out until it reaches its maximum extension, it stretches a bit... and comes loose from its other end!
At that point, and as a matter of the utmost urgency, the player lets go of the steering wheel and takes the time to reel in the (now loose) cable and painstakingly coil it back up, and only after this critically important task is completed do they look up and see where they're driving to.
[*] Re: cable comes loose: The alternative was to warn the player that they're overextending the cable and ask them to choose what to do (drop the cable where it is, or tug it loose and re-spool it). At the time, I wasn't too terribly aware of the uimenu system (which wasn't nearly as advanced as it is now), so I picked the simpler option.