Page MenuHomeFeedback Tracker

UnitPlay / Destroyed Vehicle Bug on Stable / Dev
Closed, ResolvedPublic

Description

Previously, when vehicles were destroyed with the UnitPlay function, they would terminate their script and explode in situ. Now however, they disappear if they are destroyed during the animation! The crew remain and a cloud of smoke appears but the vehicle disappears.

Details

Legacy ID
2864762960
Severity
None
Resolution
No Bug
Reproducibility
Always
Category
Scripting
Steps To Reproduce

Execute captured footage on a unit and then use the unitPlay function. Destroy the vehicle during the animation and observe.

Event Timeline

Bohemia edited Steps To Reproduce. (Show Details)Jul 21 2015, 9:55 PM
Bohemia set Category to Scripting.
Bohemia set Reproducibility to Always.
Bohemia set Severity to None.
Bohemia set Resolution to No Bug.
Bohemia set Legacy ID to 2864762960.May 8 2016, 12:25 PM

This isn't working for me now either. Vehicles disappearing if I terminate the script.

Same here. Stopped working with 1.48 update I think.

Seems the function simply need tweaking - looks as though the object that the data is being played on is getting deleted when the script is prematurely finished.

please fix!

Something is definitely wrong here, with this function. I can provide a repro if needed? Though IMHO the description on this ticket should be enough.

Could you please prepare a repro mission? I tried it by destroying helicopter in first campaign mission, and it simply fell down to ground after being destroyed. The script terminated correctly.

Right. I think I've pinpointed the problem. I've had a chat to others and it seems the culprit is a waitUntil command that many people are using at the end of their unitPlay scripts.

Basically, this:

waitUntil {scriptDone _unitPlay};
{deleteVehicle _x;} forEach
crew _Aircraft;
deleteVehicle _Aircraft;

Before the 1.48 update, this would simply delete the aircraft / vehicle after the script had finished playing. If it was destroyed, then the aircraft / vehicle would not be deleted. However, if the script finished, it would be removed. Taking out 'waitUntil' section of the script worked for me! So, I think this ticket can be closed as 'no bug'.

Thank you, Moricky, for looking into that! The fact you couldn't repro helped isolate the issue, cheers! :)

Confirmed. I have taken away waitUntil command and now everything is working. Strange it was ok before.