Real behavior: For this code
Code: Select all
AD.show("vehicle.autopilot_destination", vehicle.autopilot_destination)
AD.show("vehicle.autopilot_destinations", vehicle.autopilot_destinations)
AD.writeDebug("Trying to stop spider!")
vehicle.stop_spider()
AD.show("vehicle.autopilot_destination", vehicle.autopilot_destination)
AD.show("vehicle.autopilot_destinations", vehicle.autopilot_destinations)
Code: Select all
20189.718 Script @__autodrive__/libs/debugging.lua:167: vehicle.autopilot_destination: {
x = -11.5,
y = -17.5
}
20189.718 Script @__autodrive__/libs/debugging.lua:167: vehicle.autopilot_destinations: {
{
x = -11.5,
y = -17.5
},
{
x = -11.5,
y = -18.5
},
{
x = -12.42578125,
y = -19.06640625
}
}
20189.718 Script @__autodrive__/libs/debugging.lua:167: Trying to stop spider!
20189.718 Script @__autodrive__/libs/debugging.lua:167: vehicle.autopilot_destination: {
x = -11.5,
y = -17.5
}
20189.718 Script @__autodrive__/libs/debugging.lua:167: vehicle.autopilot_destinations: {
{
x = -11.5,
y = -17.5
},
{
x = -11.5,
y = -18.5
},
{
x = -12.42578125,
y = -19.06640625
}
}
The only way to make sure the vehicle stops seems to be this:
Code: Select all
for w, waypoint in pairs(vehicle.autopilot_destinations) do
vehicle.autopilot_destination = nil
end