Jump to content
Sign in to follow this  
dr_zakharotta

Capture and Play mission and script clearly needed

Recommended Posts

Thanks for no help ppl.

I'll be the good samaritan, so I'll post how and mods please sticky if you see fit..

1) Create 2 Triggers, 2 Units composed of 1 playable as pilot vehicle and an infantryman, 1 Function Module

2) Name the driven unit machoppa

3) Triggers/ One of them is text: Capture Data CD

/ the second is text: Replay Data RD

4) CD gets activated thru Radio ALPHA

5) RD gets activated thru Radio BRAVO

6) CD ON ACT:

chppa = [[b]machoppa[/b],[b]60[/b],[b]30[/b],[b]true[/b]] spawn BIS_fnc_UnitCapture

7) RD ON ACT:

result = [] call MyPath;

8) drivable unit machoppa init: this action ["ENGINEON",this];

9) In Documents/Arma 2/Missions/>*<

>*< = your mission say RP.utes

so in RP.utes folder create 2 SQF files,

One SQF called init.SQF

the other SQF called path.SQF

init.SQF WILL process path.SQF data, which are your drive behaviour and vehicle firing behaviour.

Next,

paste this in an empty notepad--> and save in mission folder as init.SQF filetype: file

MyPath = compile preprocessFile "path.sqf";

in path.SQF paste this and keep (*) and (**)bold

_unitPlayback = [b](*)[/b] ;
_fireData = [b](**)[/b];
[[b]machoppa[/b], _unitPlayback] spawn BIS_fnc_UnitPlay;
[[b]machoppa[/b], _fireData] spawn BIS_fnc_UnitPlayFiring; 

save path.SQF as filetype: file

LEGEND:

machoppa = drivable unit name, not infantry name

**= paste data from F2 Key = firing data

*= paste data from F1 Key = driving data

both ** and * are obtained after the CD has finished the interval written in CD triggers ON ACT field

now, preview mission,

Open Radio from map and click " Capture Data"

then switch to the chopper and start driving, every move you make will be exactly reproduced and any weapons discharged will also be mimicked by AI in replay.

after the 60 seconds are over, press ESC and then press resume, though chopper will not be moving. press F1 and paste the data on clipboard in place of the * in path.SQF

this will be a slow process so be patient, especially if you have a large interval. ALT+ESC back to game then press F2, then ALT+ESC back to path.SQF and paste firing data in place of ** also in path.SQF , SAVE AND ALT+ESC back to game.

AND YOURE DONE!!

repreview mission from infantry view. Open Radio and click Replay Data . You'll see your every move mimicked and your every shot fired same by AI pilot.

Wonderful if not great feature I say...

And I hope I helped ppl..

Share this post


Link to post
Share on other sites

Saw you posted in the unitplay thread, so I guess we figured you were able to provide self help. It has all the info you need to set it up.

Share this post


Link to post
Share on other sites

Thanks for the info, I've been wanting to try this. I saw the post and was hoping you'd get an answer... and you answered yourself. Nice job. :)

Share this post


Link to post
Share on other sites
Thanks for no help ppl.

I'll be the good samaritan, so I'll post how and mods please sticky if you see fit..

.

This the 2nd threath regarding unitcapture/play.

Found this after using the searchfuntion, typed "unitcapure" and after 1sec there was this link:

complete with example mission made by *Sniperwolf572*:

Share this post


Link to post
Share on other sites

Can i ressurect this thread please.

I'm working on a expanding support menu for a multiplayer mission. The Menu is purely script based and doesnt involve the editor.

It spawns an aircraft which travels to a set predetermined waypoint, then at that way point via exec VM, a create vehicle command is then ran in this sqf file. An example of this is below:

//null=[_plane] execvm "GBU.sqf";

   _plane = _this select 0;	

       if (isServer) then 
    {
	    _bomb = "Bo_GBU12_LGB" createvehicle [getpos _plane select 0,getpos _plane select 1,3000];
	    _bomb setpos [getpos _plane select 0,(getpos _plane select 1)+10,(getpos _plane select 2)];
	    _bomb setdir getdir _plane;
		_bomb setVelocity [((velocity vehicle _plane) select 0)/3, ((velocity vehicle _plane) select 1)/3,-30];

sleep 0.2;

       };

So when i saw this thread i thought i might be able to use the method to create a strafe or rockets instead of a bomb drop. But all i get is a line of ammo types so when i collect the GAU8 data i get below:

[[3.426,"GAU8"],[3.455,"GAU8"],[3.483,"GAU8"],[3.515,"GAU8"],[3.542,"GAU8"],[3.569,"GAU8"],[3.593,"GAU8"],[3.63,"GAU8"],[3.665,"GAU8"],[3.692,"GAU8"],[3.711,"GAU8"],[3.738,"GAU8"],[3.766,"GAU8"],[3.793,"GAU8"],[3.847,"GAU8"],[3.875,"GAU8"],[3.903,"GAU8"],[3.94,"GAU8"],[3.977,"GAU8"],[4.006,"GAU8"],[4.034,"GAU8"],[4.056,"GAU8"],[4.082,"GAU8"],[4.1,"GAU8"],[4.134,"GAU8"],[4.165,"GAU8"],[4.194,"GAU8"],[4.213,"GAU8"]]

Is it possible to create the strafe effect using this data and my create vehicle method?

(As close to layman terms as possible as im still learning how to script)

Regards

Bp

Edited by Bigpickle

Share this post


Link to post
Share on other sites

Hi, thanks for the tutorial on this. But I've been having trouble getting this to work 100%, I did everything as said, but my heli in replay won't fire, it jsut moves as I moved. Here's my path.sqf

_unitPlayback = ([[too many numbers to post on forum]]]) ;
_fireData = ([[5.078,"57mmLauncher"],[5.14,"57mmLauncher"],[5.562,"57mmLauncher"],[5.624,"57mmLauncher"],[6.06,"57mmLauncher"],[6.136,"57mmLauncher"],[6.539,"57mmLauncher"],[6.593,"57mmLauncher"],[7.008,"57mmLauncher"],[7.07,"57mmLauncher"],[7.398,"57mmLauncher"],[7.482,"57mmLauncher"],[7.599,"57mmLauncher"],[7.675,"57mmLauncher"],[7.791,"57mmLauncher"],[7.849,"57mmLauncher"],[7.961,"57mmLauncher"],[8.026,"57mmLauncher"],[8.172,"57mmLauncher"],[8.236,"57mmLauncher"],[8.36,"57mmLauncher"],[8.423,"57mmLauncher"],[8.558,"57mmLauncher"],[8.627,"57mmLauncher"],[8.766,"57mmLauncher"],[8.838,"57mmLauncher"],[8.944,"57mmLauncher"],[9.018,"57mmLauncher"],[11.075,"57mmLauncher"],[11.131,"57mmLauncher"],[11.28,"57mmLauncher"],[11.34,"57mmLauncher"],[11.492,"57mmLauncher"],[11.552,"57mmLauncher"],[11.69,"57mmLauncher"],[11.746,"57mmLauncher"],[11.889,"57mmLauncher"],[11.948,"57mmLauncher"],[12.072,"57mmLauncher"],[12.142,"57mmLauncher"],[12.252,"57mmLauncher"],[12.327,"57mmLauncher"],[12.451,"57mmLauncher"],[12.527,"57mmLauncher"],[12.639,"57mmLauncher"],[12.72,"57mmLauncher"]]);
[machoppa, _unitPlayback] spawn BIS_fnc_UnitPlay;
[machoppa, _fireData] spawn BIS_fnc_UnitPlayFiring;

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  

×