Jump to content
Sign in to follow this  
Big Dawg KS

[OA] UnitCapture & UnitPlay Functions

Recommended Posts

What's the best way to use this in MP? Would it work fine it you just had the data in an sqf file and called it with play = [chopper1,call compile loadFile "playchopper.sqf"] spawn BIS_fnc_UnitPlay or whatever, or is it better to use Sniperwolf's method?

EDIT

Ok it works fine except the chopper shakes horrendously in 3rd person. I guess I'll look into that FPS option.

I think there is a "battle" going on between where the AI wants to go and where the "playback" is moving the vehicle. :-/

Share this post


Link to post
Share on other sites
I think there is a "battle" going on between where the AI wants to go and where the "playback" is moving the vehicle. :-/

The function should disableAI the pilot. The shaking is probably just the nature of using setPos/setVelocity continiously (ok it uses a slightly different command but same concept).

Share this post


Link to post
Share on other sites

Does the unitplay work fine just for the AI ? When i'm in the vehicle there is no sound and it stutters badly. Once i exit it, it works as expected. Am i missing something here ?

Share this post


Link to post
Share on other sites

Ok this is really interesting me. However i'm still confused as to what exactly i'm meant to be doing can somebody help me out here ?

Basically i want to record my heliroute and landing, so that the AI can repeat my path.

Can somebody please help me by telling me exactly what files i need etc. (I don't even understand where the data goes to after it's been recorded)

Thanks alot

Dan

Share this post


Link to post
Share on other sites

Howdy guys,

After capturing A10 flight data, I can't seem to capture the fire data? I've hit F2 when I'd normally get movement using F1, but nothing moves to the clipboard. To begin recording, I used:

rec = [P1,500] spawn BIS_fnc_UnitCapture

Where P1 is the aircraft name.

Any ideas?

Share this post


Link to post
Share on other sites

One thing to note, you need the functions module in your mission. Otherwise the record and playback routines will not work.

Share this post


Link to post
Share on other sites

I know that; I make sure that module is placed, and I actually get movement data using F1 to copy fine, but for some reason fire data just isn't copied?

Share this post


Link to post
Share on other sites

Yes. And when run on an A10, which I use to fire missiles, etc, I can capture the movement data with F1, but F2 doesn't work? There is nothing in the cut/paste buffer.

Share this post


Link to post
Share on other sites

That's too bad that this doesn't work with ground units, because I had an idea to get in a ZU-23 and spray random AA fire across the sky, the play it, in order to achieve a "Shock & Awe" effect above the skyline.

Share this post


Link to post
Share on other sites

how do I use that people. You know I could run a clip for a Predator pilot and I spawn as gunner? this is how the camera will be stable. Its fixed alright but one wants perfection

Share this post


Link to post
Share on other sites

okay people hands down Please just write step to step instructions.

With all the scripts n shit. I've tried but i can't get it to work!

Share this post


Link to post
Share on other sites
okay people hands down Please just write step to step instructions.

With all the scripts n shit. I've tried but i can't get it to work!

check my thread..

Share this post


Link to post
Share on other sites
What thread? Can't you link it?

:)

search and look for a thread started by dr_zakharotta

Share this post


Link to post
Share on other sites

I've followed the missions posted above, and I've got a map with helicopter two paths (Insertion and an attack on a building not far away). The paths work brilliantly - no issue there. The issue is with getting the second helicopter to fire on command.

I've copied and pasted the code from SniperWolf's example (which works fine - both path and firing), and changed to suit what I want, and then it doesn't work. Can someone let me know what I'm doing wrong ?

[b]init.sqf[/b]
LBPath = compile preprocessFile "lbpath.sqf";
CASPath = compile preprocessFile "caspath.sqf";

[b]lbpath.sqf[/b]
_InsertionPath = [<<Data>>];
[LittleBird_Insertion, _InsertionPath] spawn BIS_fnc_UnitPlay;

[b]caspath.sqf[/b]
_CASPath = [<<Data>>];
_CASFire = [[67.187,"FFARLauncher_14"],[67.431,"FFARLauncher_14"],[67.689,"FFARLauncher_14"],[67.894,"FFARLauncher_14"],[68.209,"FFARLauncher_14"],[68.454,"FFARLauncher_14"],[68.663,"FFARLauncher_14"],[68.874,"FFARLauncher_14"],[69.158,"FFARLauncher_14"],[69.359,"FFARLauncher_14"],[69.66,"FFARLauncher_14"]];
[Venom_CAS, _CASPath] spawn BIS_fnc_UnitPlay;
[Venom_CAS, _CASFire] spawn BIS_fnc_UnitPlayFiring;

[b]Radio Call - Ingame Trigger[/b]
path1 = [] call LBPath; path2 = [] call CASPath;

Share this post


Link to post
Share on other sites

I've retested it a few times, and it actually seems to be the FFARLauncher that is the problem. I changed to a AH-64D and could fire Hellfires and the cannon, but still no rockets.

Anyone had any experience with this ?

Share this post


Link to post
Share on other sites

OH MY GAWD!!!!!!!!!!!!!!!!!!!!!

Now I can finally set up realistic waypoints for ai in buildings !!!!!!!!!!!!

no more buggy building patrols!!!

and realistic movements finally

but how does it work after its played the recorded action? if its in a squad will the action play then wherever the ai is will it go back to its original formation within a group or whatnot?

thanks for sharing this im gonna try it now!

Share this post


Link to post
Share on other sites
OH MY GAWD!!!!!!!!!!!!!!!!!!!!!

Now I can finally set up realistic waypoints for ai in buildings !!!!!!!!!!!!

no more buggy building patrols!!!

and realistic movements finally

but how does it work after its played the recorded action? if its in a squad will the action play then wherever the ai is will it go back to its original formation within a group or whatnot?

thanks for sharing this im gonna try it now!

I don't think you're going to get any decent results...

Keep in mind this script is designed for air units, like helicopters and aircrafts. It's not working properly with ground units (wheels are not turning with vehicle among other things) and it doesn't capture soldier's animations.

Also, using too many recorded paths can lead to slower framerate. Use as you wish for making videos, but be really careful when using it in playable mission.

Share this post


Link to post
Share on other sites

yea i tried it out, kind of sucks the animations arent shown, but maybe theres a way to script the animations in place?

for vehicles i tried an m1a2 tusk and did some back alley driving in zargabad and the tracks do actually animate themselves, but no sound is heard from the engine when the tanks is moving...

also, adding 3 more ai tanks to his group made them follow his movements (somewhat)

also another thing, it actually fires on enemy units in its line of sight and kills them, it just wont stop or change movement until the play finishes.

pretty neat tho

Share this post


Link to post
Share on other sites

Hello

Im having a problem using these commands on an AI flown C-130, the AI seem to be fighting the commands and making the plane judder around. I dont get the problem when I am sat in the plane not touching the controls.

Tried it with 20fps, 30fps and 60fps recording.

I tried using some commands in the init field of the aircraft:

this disableAI "MOVE"

and

(driver this) disableAI "MOVE"

dont work

Any ideas?

Share this post


Link to post
Share on other sites

take a look on this video tutorial that I found in youtube :

ryB20wQhSr0

Edited by zombo

Share this post


Link to post
Share on other sites

So this recording is only really used for flying that' s already in motion, in other words a trigger isn't going to activate the person getting into a pilots seat and if it does he wont turn on the heli then the script will run with no rotors spinning.

I loved this You tube tutorial it was so helpful, I hope we see more tutorials on how to use this even more effectively.

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
Sign in to follow this  

×