WarfighterOne 10 Posted July 8, 2013 (edited) Like always, I was doing one of the showcase missions and ended it immediately, why? In the "Commanding Showcase" the littlebird flies you into an LZ like a player would, it was flying nice and low and landed like it would in a hot zone. So It came to mind that they must have mapped a player flying that helicopter and had the ai replicate it. So I opened the PBO file for the showcase and found "LittleBird.SQF", which was a script of strictly coordinates that had to be recorded by some kind of software in the game but I have never heard of that, Im still new to editing though. Any Idea on how to do this? http://i760.photobucket.com/albums/xx245/Reignbow6/Untitled.png (1243 kB) Right now the AI pilots dont fly well when under any kind of fire plus they land so slowly, Plus they crash into the terrain too often. This technique would make my missions a lot better and more realistic, Like simulating a crash or something. Thank You Edited July 8, 2013 by WarfighterOne Share this post Link to post Share on other sites
TGxAltair 10 Posted July 8, 2013 You can use .sqf files to put into your missions folder in your documents and determine certain things. It should be doable to plot a specific set of waypoints for AI using .sqf files or even the Initialisation panel in the editor. I'll get in touch with one of our lads who uses .sqf files a lot and may be able to help you. Share this post Link to post Share on other sites
fraczek 4 Posted July 8, 2013 Are you possibly looking for UnitCapture / UnitPlay script commands? These two would, IIRC, do exactly what you want (introduced in A2 OA, intended exactly for that and used by BIS in their own A2 OA campaign for heli insertions). See this forum thread or google UnitCapture UnitPlay. Share this post Link to post Share on other sites
thdman1511 4 Posted July 8, 2013 After reading the above post and watching a youtube video on unitcapture, I have found the the capture part records a lot of data using BIS_fnc_unitCapture, but I havent been able to get it to playback. And I think that is because you need a function module, which I cannot find in Arma 3 Beta. I havent been able to get it to playback using BIS_fnc_unitPlay. So if anyone know of a way to get it working would be nice. Share this post Link to post Share on other sites
Larrow 2822 Posted July 8, 2013 (edited) You no longer need a function module in Arma3 it is initialised automatically. Place a unit down for the player and an empty helicopter named heli1. create a radio trigger alpha and place rec = [heli1,200,30] spawn BIS_fnc_unitCapture; in the OnAct. create a radio trigger bravo and place handle = [heli1, recpath, [] ,true, true] spawn BIS_fnc_UnitPlay; Preview the mission, get in the helicopter and press 0-0-1 to start recording, fly a few hundred meters and land, press escape and escape again then F1. Create a new file in the mission folder called mypath.sqf, place recpath = in it then immediately paste in the information that is on the clipboard from recording. (should look something like ) recpath = [[0,[1868.3,5749.42,5.57866],[-0.0871298,-0.996182,-0.00541656 /*snip . create a init.sqf with call compile preprocessFile "mypath.sqf"; preview the mission again, do not get in the helicopter but do 0-0-2 to start playback and watch the helicopter repeat what you recorded. test mission Other things to note is this only captures the position of vehicles it does not capture things like the engine being turned on etc. To make it not look like the helicopter is flying without the rotors turning you will need to turn on the engines in the radio trigger bravo before you call the play back using heli1 engineOn true; Edited July 8, 2013 by Larrow Share this post Link to post Share on other sites
fortun 14 Posted October 25, 2013 Thanks for the info! :) Could you also be able to do so it captures when im firing rockets and so? Share this post Link to post Share on other sites
Larrow 2822 Posted October 26, 2013 Thanks for the info! :)Could you also be able to do so it captures when im firing rockets and so? Look in the function viewer under scenes there are a few unitCapture/unitPlay type functions that can enable the capturing of firing , should not be too much different from the above to setup just read their comments in the function viewer to see what you have to do. Share this post Link to post Share on other sites
fortun 14 Posted October 26, 2013 Got it working with firing now. After some lookaround on internet i found one guide and combined it with some testing. Now, theres some more testing! ;) Share this post Link to post Share on other sites
anthonyfromtheuk 6 Posted October 26, 2013 Share the link to the guide? Share this post Link to post Share on other sites
fortun 14 Posted October 26, 2013 In the comments of this one http://www.youtube.com/all_comments?v=ryB20wQhSr0 " For fire data in the record trigger: rec = [Heli1,200] spawn BIS_fnc_UnitCapture; rec = [Heli1,200] spawn BIS_fnc_UnitCaptureFiring; Path.sqf need to be : Path1 =; Fire1 =; [Heli1, Path1] spawn BIS_fnc_UnitPlay; [Heli1, Fire1] spawn BIS_fnc_UnitPlayFiring; Thats it!! Just missed a few lines. " Share this post Link to post Share on other sites
Larrow 2822 Posted October 27, 2013 BIS_fncUnitCapture will also capture the firing data as well (saves you running two recording scripts). Parameters: Unit - Unit to capture movement data from Duration - Duration to capture for OPT:FPS - OPTIONAL: Frames recorded Per Second (default 20). Limit is 1 - 100 OPT:Firing - OPTIONAL: If true, will record the input unit's weapon fire data as well OPT:StartTime - OPTIONAL: Starting time offset for the frame time Then when you press escape escape press F1 to copy move data and paste it into your file then go back to your game and press F2 to copy firing data. You still need to play them separately as FortuN has shown above. Share this post Link to post Share on other sites
the_demongod 31 Posted October 30, 2013 I would like to have two different helicopters use separate paths. what do I have to change to make them be recognized as unique? ave, the_Demongod Share this post Link to post Share on other sites
Pomi Git 256 Posted November 25, 2013 Does anyone know if its possible to end UnitPlay early? I.e terminate it mid way through Cheers Pomigit Share this post Link to post Share on other sites
Wiki 1558 Posted December 2, 2013 So, what's the command to replay the firing? I manage to record and play the movement, not the firing. Any help please? Share this post Link to post Share on other sites
Shoot1staskquestionslater 1 Posted January 7, 2014 I am trying to replicate this function/script and get the following problem(s). 1. as soon as the trigger and function active the time goes to night, so I got to switch on night vision. No problem really. 2. The right side says that the unit capture as completed with 0 frames, 0 seconds, 0 etc etc. 3. paste from clipboards results in [] So the function starts and stops instantly and does not record any motion. Any idea's for help? Thanks in Advance Share this post Link to post Share on other sites
rakowozz 14 Posted January 7, 2014 Passing by to remind everyone unitPlay does not currently function properly on dedicated. http://feedback.arma3.com/view.php?id=15919 At least the last I checked... Share this post Link to post Share on other sites
pipyn1970 19 Posted March 24, 2014 Hi folks, im trying to set this up also. I need to work out how to record my ghost hawks flight as well as have their guns firing but I just can't get my head round it. I've got my Flight recorded & i've just managed to play it back if I'm not in the helicopter but how can record me shooting? Many many thanks in advance Share this post Link to post Share on other sites
jetherjr 12 Posted June 4, 2015 Hello everyone! I'm using the command rec = [heli2 .30 .600] spawn BIS_fnc_unitCapture; for recording, and heli1 engineOn true; handle = [heli1, recpath, [], true, true] spawn BIS_fnc_UnitPlay; to play I'm having problems with the helicopters when landing, I can't make the engines shut down. Anyone know tell me how should I proceed? Share this post Link to post Share on other sites
Senshi 10 Posted June 5, 2015 Execute this engineon false; after landing Share this post Link to post Share on other sites
jetherjr 12 Posted June 5, 2015 (edited) Executethis engineon false; after landing I used this command in space (On Dea) and it didn't work! I used; heli1 engineOn false; can you put an example please ? Thanks Edited June 5, 2015 by jetherjr Share this post Link to post Share on other sites
daniel-davies 10 Posted June 5, 2015 Make a trigger and set the condition to this: (velocity heli1) select 2 > -0.2 && (getPosATL heli1) select 2 < 0.5 Then in the on act field put: Heli1 engineOn false; Share this post Link to post Share on other sites
Senshi 10 Posted June 6, 2015 You gotta make sure the engineon false is executed after the unit has landed (as in: the BIS_fnc_Unitplay is complete). As BIS_fnc_Unitplay is spawned in a separate thread (= spawn command), you need to wait for it to be done. Which should be possible using a script like this: heli1 engineOn true; _handle = handle = [heli1, recpath, [], true, true] spawn BIS_fnc_UnitPlay; waitUntil {scriptDone _handle}; heli1 engineOn false; However, sometimes the AI is stupid and still wants to immediately restart the engines. You can "cheat" a bit and use heli1 setFuel 0; If there's no fuel, the AI can't start the engine :) . I'd guess this won't work using init fields and triggers, instead you have to use "proper" scripting (sqf files). Share this post Link to post Share on other sites
SilentSpike 84 Posted June 6, 2015 However, sometimes the AI is stupid and still wants to immediately restart the engines. You can "cheat" a bit and use heli1 setFuel 0; If there's no fuel, the AI can't start the engine :) . You can unassign the driver to stop this "properly" unassignVehicle (driver _heli) :) Share this post Link to post Share on other sites
jetherjr 12 Posted June 6, 2015 You gotta make sure the engineon false is executed after the unit has landed (as in: the BIS_fnc_Unitplay is complete). As BIS_fnc_Unitplay is spawned in a separate thread (= spawn command), you need to wait for it to be done.Which should be possible using a script like this: heli1 engineOn true; _handle = handle = [heli1, recpath, [], true, true] spawn BIS_fnc_UnitPlay; waitUntil {scriptDone _handle}; heli1 engineOn false; However, sometimes the AI is stupid and still wants to immediately restart the engines. You can "cheat" a bit and use heli1 setFuel 0; If there's no fuel, the AI can't start the engine :) . I'd guess this won't work using init fields and triggers, instead you have to use "proper" scripting (sqf files). Thank you! I will try and post here the result! Cheers Share this post Link to post Share on other sites