I'd like to have something like raise_destroy for set_driver() and set_passenger(), so that they don't raise the on_driving_state_changed event.destroy(opts) → boolean
Destroys the entity.
Parameters
opts (optional): Table with the following fields:
do_cliff_correction :: boolean (optional): If neighbouring cliffs should be corrected. Defaults to false.
raise_destroy :: boolean (optional): If true; defines.events.script_raised_destroy will be called.
Reason: In this mod, I want to move vehicles with driver/passenger between surfaces. As only players can be moved with teleport(), I need to clone the vehicle to the new surface and then place driver/passenger inside it. Technically, they change the driving state because they leave one vehicle and enter another one. However, from the player's perspective, they would remain in the same vehicle, so not raising the event would mean not running (unnecessarily) a lot of code.