[1.1.74] LuaEntity::set_driver fails if the character is in a vehicle that it cannot exit
Posted: Mon Dec 12, 2022 4:16 pm
To reproduce, use AAI Ironclad mod.
- Place car and boat
- Enter boat, drive into lake
- Hover cursor over car
- Run `/c game.player.selected.set_driver(game.player.character)` --> nothing happens
- Run `/c game.player.vehicle.set_driver(nil) game.player.selected.set_driver(game.player.character)` --> this workaround works, now you are driving the car
There's an easy workaround, but it feels rather unintuitive. If it is decided that it is working as intended, then it should be added to the set_driver docs.
- Place car and boat
- Enter boat, drive into lake
- Hover cursor over car
- Run `/c game.player.selected.set_driver(game.player.character)` --> nothing happens
- Run `/c game.player.vehicle.set_driver(nil) game.player.selected.set_driver(game.player.character)` --> this workaround works, now you are driving the car
There's an easy workaround, but it feels rather unintuitive. If it is decided that it is working as intended, then it should be added to the set_driver docs.