Jump to content
Sign in to follow this  
Big Dawg KS

[OA] UnitCapture & UnitPlay Functions

Recommended Posts

ansen dont know what problems your having but i managed to use it on every fixed wing aircraft i have and helo's for that matter to. Re-watch the tutorial and follow closely.

Share this post


Link to post
Share on other sites

Well If someone would be nice enough to help me a little more I was able to follow the video (very helpful) However once I have the path.sqf as a file and I can play it back with a radio call. Now I want to be able to get it to fire off on a trigger or way point. so my question is

I set up a pilot and add a get in waypoint to heli1 (I have a co-pilot and a soldier as passengers I play one of them to observe how things are going) then I add a second move waypoint and preview the mission and the pilot never turns on the chopper???

I want him to turn it on by himself and then have the path sqf fire upon reaching the second waypoint...

Any ideas??

Share this post


Link to post
Share on other sites

Hello, i have a problem with the unit play on an MH6, the screen shake when the MH6 fly.

I have try to put the fps higher but the problem is the same.

Share this post


Link to post
Share on other sites

ummm if you read back they said to put the FPS slower when recording

Share this post


Link to post
Share on other sites

I have try with 5 and 10 fps, it's a little better but it's not playable , it's continue to shake the screen.

Share this post


Link to post
Share on other sites

Mine shakes too I haven't really tried to get this down yet until I understand how to play them back into triggers

Share this post


Link to post
Share on other sites

I have noticed that running a lot of complex scripts in the background can cause very noticible stuttering with the playback. The offenders are usualy scripts with a lot of instances that are constantly running (ex: per unit scripts). These scripts can use up enough of the limited script processing time that it interferes with the playback script (causing it to run more slowly), which is afterall no different in terms of execution priority than any normal script.

Share this post


Link to post
Share on other sites

Yeah, I have noticed that ACE increase a lot the stuttering too.

We should try with fsm, could be better.

Share this post


Link to post
Share on other sites

I just confirmed that unfortunately ACE causes a really bad stutter. Reloaded without ACE and it was a lot better and usable. I really hope it something that can be addressed as I wanted to make the series of missions using ACE.

Share this post


Link to post
Share on other sites

i flew over this thread and hope i didnt miss the answers for my following questions. everything works fine till the point where it's enjoyable enough of a feature, but there's a few things that i would like to comfirm for myself.

1. unitcapture turns off sounds for vehicles? it's not too bad but a little weird.

2. it is impossible to record two paths for one unit, correct? ie a convoy moves, gets attacked in a village, vehicles stay at their position and continue moving when a trigger is activated (<- zone clear of enemies). what happens is that if i record a path, i am no longer able to move the vehicle around after i stopped recording. i might play around with deleting the unit and spawning a new one in the last recorded position but that seems unnecessary.

3. when a vehicle reaches it's recorded final position, is it possible to enable the ai driver again?

i know this was made for an aid for insertions etc but maybe it can do more.

Share this post


Link to post
Share on other sites

1. unitcapture turns off sounds for vehicles? it's not too bad but a little weird.

No it doesn't disable sounds, you're just not hearing any because the way the recorded movement is played back does not use the vehicle's own movement (so engine sounds, animations, etc... are not tied to it). This is why it's primarly only used for aircraft (where lack of anims and sounds are less noticible).

2. it is impossible to record two paths for one unit, correct? ie a convoy moves, gets attacked in a village, vehicles stay at their position and continue moving when a trigger is activated (<- zone clear of enemies). what happens is that if i record a path, i am no longer able to move the vehicle around after i stopped recording. i might play around with deleting the unit and spawning a new one in the last recorded position but that seems unnecessary..

The script disables the recorded vehicle afterwards. Not sure why, but it's not really a big deal. What I usualy do to record multiple, sequential captures is to record the first, play it back on the unit, and when it finishes record the second.

3. when a vehicle reaches it's recorded final position, is it possible to enable the ai driver again?

They should automatically be renabled after the playback is completed. Of course, they might be confused having essentially blacked out and woken up to realize they're in a completely different location. :cool:

Share this post


Link to post
Share on other sites

hey sorry to break into this but..does anyone know how to get multiple recordings to play at once...for example formation flying?

I've read this

I usualy do to record multiple, sequential captures is to record the first, play it back on the unit, and when it finishes record the second.

But I don't think that's what I'm looking for

Share this post


Link to post
Share on other sites
hey sorry to break into this but..does anyone know how to get multiple recordings to play at once...for example formation flying?

I've read this

I usualy do to record multiple, sequential captures is to record the first, play it back on the unit, and when it finishes record the second.

But I don't think that's what I'm looking for

I use a similar approach for formations: Record the lead aircraft, then play it back and record yourself in the next aircraft following it. Just make sure you get the timing right when you play them all back.

Share this post


Link to post
Share on other sites
use a similar approach for formations: Record the lead aircraft, then play it back and record yourself in the next aircraft following it. Just make sure you get the timing right when you play them all back.

Well my question is: How do i play them all back at the same time??

What does the init.sqf file need to look like?

As far as I know the init.sqf in the example mission (desert) is for capturing one unit.:confused:

Share this post


Link to post
Share on other sites
Guest

Just have them each start from a trigger (or the same one). If all triggers fire at the same time then all captures will be played together aslong as you recorded them all in sync.

Share this post


Link to post
Share on other sites
Just have them each start from a trigger (or the same one). If all triggers fire at the same time then all captures will be played together aslong as you recorded them all in sync.

Have you ever recorded something?

What does your init.sqf file look like?

Because as I said before..the init file that I have is for recording one aircraft only.

Share this post


Link to post
Share on other sites
Guest

Well you should have something similar to this in your init.sqf atm:

path1_1 = compile preprocessfile "path1.sqf";

Just make another one and put the code in init.sqf like this:

path1_1 = compile preprocessfile "path1.sqf";
path2_2 = compile preprocessfile "path2.sqf";

So you have two seperate paths.

NOTE: Your names will be different to mine. Not path 1_1, path1.sqf etc.

Share this post


Link to post
Share on other sites
Well you should have something similar to this in your init.sqf atm:

path1_1 = compile preprocessfile "path1.sqf";

Just make another one and put the code in init.sqf like this:

path1_1 = compile preprocessfile "path1.sqf";
path2_2 = compile preprocessfile "path2.sqf";

So you have two seperate paths.

NOTE: Your names will be different to mine. Not path 1_1, path1.sqf etc.

ah ok will try it when I have the time..thanks in advance!

Share this post


Link to post
Share on other sites

@Acelondonor:

I tried it and now it works..but not in the way I would think it would work.

My init file looks like this, the way you suggested:

MyPath = compile preprocessFile "path.sqf";

MyPath2 = compile preprocessFile "path2.sqf";

In my mission folder I have the init.sqf, path.sqf and path2.sqf

Ingame in order for it to work, I thought i had to call both paths in a trigger so it would look something like this:

result = [] call MyPath;result = [] call MyPath2;

It doesn't work when I put it that way

Now the strange thing is when I only put this in the trigger:

result = [] call MyPath2;

My both recordings play even though I've only called path2.

Can anyone or you clarify this please?

Thanks in advance!

Share this post


Link to post
Share on other sites

Oh dear it took me a while until i had the time to check back on this, but BIG UP BIG DAWG. you little fox. that worked like a charm. just came back to say thanks!

as for this:

@Acelondonor:

Ingame in order for it to work, I thought i had to call both paths in a trigger so it would look something like this:

result = [] call MyPath;result = [] call MyPath2;

It doesn't work when I put it that way

Now the strange thing is when I only put this in the trigger:

result = [] call MyPath2;

My both recordings play even though I've only called path2.

i don't really have more knowledge than you do but i know i use a different code to activate the unitplay. try putting this in your trigger:

rec = [] spawn Mypath; rec = [] spawn Mypath2;

anyways, i'm not even sure of what i'm saying but this seemed suspiscious.

i guess you have already seen the video in the previous pages, but i'd want to stress if you do everything like hypnotoad does in

and follow bigdawgs advice, you should end up with some pretty sweet realization of your idea. check the second video too for firing data, also works perfectly.

Share this post


Link to post
Share on other sites
Oh dear it took me a while until i had the time to check back on this, but BIG UP BIG DAWG. you little fox. that worked like a charm. just came back to say thanks!

as for this:

i don't really have more knowledge than you do but i know i use a different code to activate the unitplay. try putting this in your trigger:

rec = [] spawn Mypath; rec = [] spawn Mypath2;

anyways, i'm not even sure of what i'm saying but this seemed suspiscious.

i guess you have already seen the video in the previous pages, but i'd want to stress if you do everything like hypnotoad does in

and follow bigdawgs advice, you should end up with some pretty sweet realization of your idea. check the second video too for firing data, also works perfectly.
i guess you have already seen the video in the previous pages, but i'd want to stress if you do everything like hypnotoad does in this video and follow bigdawgs advice, you should end up with some pretty sweet realization of your idea. check the second video too for firing data, also works perfectly.

Will test it when I have time.

Thanks for the info--> looks easier ;)

Share this post


Link to post
Share on other sites

Ok I'm having a little trouble with this... I can get unitcapture/unitplay to work perfectly fine if I start the Heli from a flying position.

When I try to start it from the ground with the engines off, after I do unitcapture, paste the path, and start again and do unitplay, the heli DOES move, and in the way that I flew it, BUT the rotors don't spin and the engine is off. I even tried started the unitcapture, when the blades were first starting to spin up and still when I replay it, nothing spins, and there is no engine sound.

I remember reading a thread awhile ago that discussed this issue, but I can't seem to locate it now, no matter how I search for it. And of course when I was reading about it, I was actually looking for different information, so I was just skimming through threads, and not really committing that information to memory.

Anyone know how to make it so my heli is "parked" with engine off, I load my team and the heli's blades start spinning up and takes off?

Like I said, I am having no problems getting this to work from a flying position, just when I start "in formation". Besides this one issue, everything else about this is pretty straightforward. The hardest part so far for me is overcoming my lack of piloting skills.

Another question: Do I have to pilot the chopper to do the unitcapture, or can I set up a mapclick and record the AI's flight data?

Also, I need 1 heli to have have 2 possible LZ's. I put the first LZ in there and it works fine, I then went and added the second LZ and now neither work. I take it you can't have 2 possible unitplay's for a single unit? Is there a way to accomplish this?

here's what I got.

init

Mypath = compile preprocessFile "path1.sqf"
Mypath2 = compile preprocessFile "path2.sqf"

path1

Path1 =(UnitCapture pasted text wall here);
[heli1, Path1,20] spawn BIS_fnc_UnitPlay;

path2

Path2 =(UnitCapture pasted text wall here);
[heli1, Path2,20] spawn BIS_fnc_UnitPlay;

Radio Trigger 1 on act:

rec = [] spawn Mypath;

Radio Trigger 2 on act:

rec = [] spawn Mypath2;

To me it all looks right, that's why I am assuming that I just can't do this? Also, both UnitCapture's where started from the exact same spot.

Edited by Rail82

Share this post


Link to post
Share on other sites
Ok I'm having a little trouble with this... I can get unitcapture/unitplay to work perfectly fine if I start the Heli from a flying position.

When I try to start it from the ground with the engines off, after I do unitcapture, paste the path, and start again and do unitplay, the heli DOES move, and in the way that I flew it, BUT the rotors don't spin and the engine is off. I even tried started the unitcapture, when the blades were first starting to spin up and still when I replay it, nothing spins, and there is no engine sound.

I remember reading a thread awhile ago that discussed this issue, but I can't seem to locate it now, no matter how I search for it. And of course when I was reading about it, I was actually looking for different information, so I was just skimming through threads, and not really committing that information to memory.

Anyone know how to make it so my heli is "parked" with engine off, I load my team and the heli's blades start spinning up and takes off?

If you look back a few posts in this thread I explained this a bit. The function captures the absolute position, orientation, and velocity of the object in the world at specific time intervals, and when you play it back it simply copies these values frame by frame (with some interpolation). It does not capture your actual input nor play them back through the AI crew, so the animations (rotors, steering/control surfaces) and sounds (engine speed) or anything else that is directly controlled by user input (and not controlled by the object's physical movement within the world) will not be captured. Unfortunately, while it may be possible to modify the script to capture these things, I don't see any way of practically playing them back. This is why these scripts are really only useful for aircraft, where so long as the engine is running the rest is not so noticible. Fortunately, you should be able to force the engine on at the beginning of the playback using engineOn.

Another question: Do I have to pilot the chopper to do the unitcapture, or can I set up a mapclick and record the AI's flight data?

No, it will work on any object. As I described above, it will capture the world movement of any valid Object regardless of what's controlling the movement (so you could in theory recapture the playback of another capture). You also can play the recorded data back on any object and not just the one you recorded it with. For example: you can record movement from a fired bullet and play it back on a tank (tank artillery?), or record a boat and play it back on a building (I imagine that'd just look creepy).

Also, I need 1 heli to have have 2 possible LZ's. I put the first LZ in there and it works fine, I then went and added the second LZ and now neither work. I take it you can't have 2 possible unitplay's for a single unit? Is there a way to accomplish this?

You can call the script any number of times on the same object and it should work fine as long as you don't try to play more than one on the same object at a time. Why it's not working I can't tell you. Everything you posted looks correct except for a lack of terminating semicolons in your init, but perhaps that's just the result of copying it into your post. But if I had to guess it'd be that one of (or both) path1.sqf and path2.sqf are not compiling. Check them for any syntax errors, and try debugging the value of Mypath and Mypath2; if they compile properly these variables will return the code from path1.sqf and path2.sqf inside a pair of {}s.

Edited by Big Dawg KS

Share this post


Link to post
Share on other sites
I just confirmed that unfortunately ACE causes a really bad stutter. Reloaded without ACE and it was a lot better and usable. I really hope it something that can be addressed as I wanted to make the series of missions using ACE.

Does anyone know if this issue has been resolved? Or is ACE and unitplay just not compatible? I have a mission with ACE and the unitplays stutter horribly. Like it almost makes me dizzy and physically ill when watching it in 3rd person on the screen.

Mapclick inserts were too unreliable in my mission due to the terrain, so I really have no choice but to use unitplays. It will suck if I have to remake the whole mission without ACE.

Share this post


Link to post
Share on other sites

Hi has anyone tried this with infantry, both unit capture and weapon capture ? I wanted to make a CQB scene where the soldiers move tactically and employ real life CQB room breaching tactics like flashbang cover left and right.

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  

×