Jump to content
Wiki

Problem with unitcapture/unitplay

Recommended Posts

Hi guys.

 

I got a problem:

I use unitcapture/unit play to make a rocket run with a plane.

Everything works fine but the firing:

 

I fire 20 rockets and when it replays, only 2 are fired - whereas there are 20 rockets in the path.sqf file.

 

Any idea about where the problem comes from?
Or to solve it?

 

Thanks

Share this post


Link to post
Share on other sites

Name of the plane? Is it from a mod? Have you tried to re-record the unit fire? So many questions : )

Share this post


Link to post
Share on other sites

It's vanilla.

Already tried to make different record, always the same issue.

 

Plus, no matter which vehicle it is, I always encounter this bug with the rockets.

 

(and with the heelcat, it didn't even fire at all, even with MG)

Share this post


Link to post
Share on other sites

Maybe add a script to make it fire more when you want it to.  ForceWeaponFire might work.  If you want the rockets to be fired close in time, you could put a Fired eventHandler on the aircraft, so the first time it fires via unitPlay it kicks off additional firings via a script.

Share this post


Link to post
Share on other sites

So I'm trying to make an extraction where a helo flys in throught the trees, fires off a couple missles then swoops around to land, everyone hops in, and the helo flies away to end the mission.
I have the flight path recorded, scripted to call from a trigger, wait until everyone is in then take off when everyone is on board. Unfortunately, I am having no luck at all with making the helo shoot the missiles.
I record the firing data with

rec = [vehicle player,200,20,true] spawn BIS_fnc_UnitCapture;

called from a trigger then past it into my script as:

_firingdata = [[45.113,"missiles_DAR"],[45.199,"missiles_DAR"],[45.284,"missiles_DAR"],[45.37,"missiles_DAR"],[45.458,"missiles_DAR"]];

then call it with:

[extract_helo, _firingdata] spawn BIS_fnc_UnitPlayFiring;


But no matter what I do the helo will just not fire. I managed to get it to work once with a little bird but it would only shoot once and subsequent missiles had to be spawned in from an eventhandler emebedded in the script which doesn't really work and looks really stupid.
So far I have rerecorded firing data and from all armed vanilla helos, all armed RHS US and Russian helos and the Bundeswehr EC-635 BW pack.
From what I can see only guided missiles will fire, and only once per playback. Miniguns and cannons will not fire, nor will unguided missiles, flares, or bombs.
I've seen people using this with success in other missions and videos but I'm just not having any luck. Any help would be greatly appreciated.
My script looks like this: 

_movementdata = <data>
_firingdata = <data>  
[extract_helo, _movementdata] spawn BIS_fnc_UnitPlay;
[extract_helo, _firingdata] spawn BIS_fnc_UnitPlayFiring;

extract_helo flyInHeight 0;

waitUntil {triggerActivated Leave};
  
movementdata1 = <data>  

[extract_helo, _movementdata1] spawn BIS_fnc_UnitPlay;

extract_helo flyInHeight 0;


 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×