Skip to content

Setting aircraft vehicle health to zero causes infinite blowing #2443

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
Xenius97 opened this issue Nov 23, 2021 · 3 comments
Open

Setting aircraft vehicle health to zero causes infinite blowing #2443

Xenius97 opened this issue Nov 23, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@Xenius97
Copy link
Contributor

Describe the bug
Spawn a helicopter or plane, change health to 0.
When you change health, and heli explodes onVehicleExplode && onClientVehicleExplode won't detect.
Sometimes heli keeps blowing after fixing it. + When you change health to zero sometimes it causes infinite blowing.

Expected behaviour
Work as another vehicles

Screenshots
https://youtu.be/ZBt0AzxKaao

Version
Multi Theft Auto v1.5.9-release-21024.1

@Xenius97 Xenius97 added the bug Something isn't working label Nov 23, 2021
@Lpsd
Copy link
Member

Lpsd commented Nov 23, 2021

What you're seeing is intended behaviour.

All cars/helicopters/planes etc, once set to 0 health, will have ~5 seconds before they actually "explode" and are destroyed.

In the case of cars, they will set on fire before exploding.
However with helicopters and planes, they have an explosion effect instead of being set on fire (which is what you describe as "infinite blowing"). This is the same in singleplayer.

blowVehicle instantly triggers the explosion which "destroys" the vehicle.

This is why the on(Client)VehicleExplode event fires instantly when using :blow(), but there's a delay when setting vehicle health to 0.

@Xenius97
Copy link
Contributor Author

Xenius97 commented Nov 23, 2021

If you change health to zero, onVehicleExplode && onClientVehicleExplode will never trigger on helicopters/planes. I think it's bug.

@Lpsd
Copy link
Member

Lpsd commented Nov 23, 2021

That's not shown either by your video, or by testing that I did myself. The event triggers fine after setting health to 0, just ~5 seconds afterwards as I've explained above.

Your own video shows the event firing after 5 seconds. At around 1:52 you set the helicopter health to 0, then at around 1:58 the event is triggered once the pre-explosion effects are finished (see debugscript output).

Please provide new details if you're experiencing something other than what's been shown and explained to be intended behaviour.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants