Jump to content
Sign in to follow this  
JDog

How to extract a CRRC with a Chinook (Guide)

Recommended Posts

There are like 3 thread on here about this so figured I'd make one more with a clear title instead of replying to all those (ok my excuse is out, flame you worst).

Ok since a few people have asked about how to do it and for the scripts... here it is, sample mission and all. If you can't figure it out by the mission, to get it to work, configure the Chinook as so:

Place a waypoint immediately before the spot you want to be pick up at. On activation:

[i]chopperName [/i]flyInHeight 2.5;
[i]chopperName[/i] animate ["Ani_Ramp",1];

Do not set him to fly this low too far before the pickup waypoint, as he will sink when pivoting upwards to stop.

Now the waypoint you get picked up at:

Condition:

!isEngineOn [i]boatname[/i] AND [i]boatname[/i] distance [i]heliName[/i] < 5;

On Activation:

nul=[[i]boatName[/i], [i]chopperName[/i]] execVM "onceAboard.sqf";

That will get the boat secured into the cargo area and give you an option to move into a seat in the Chinook. It will also move anyone else in the squad to the chinook seats. Be sure to set his flyInHeight higher up now also.

_____________________________

Also I threw in a little script that allows you to pull the CRRC out of the Chinook, however more often than not, the collision models mess it up and the Chinook jumps around. If anyone can find a solution for this, plz post it :)

Download

Filefront

Edited by JDog

Share this post


Link to post
Share on other sites

So something to mention... the script triggers the attachTo and everything else when you turn your engine off. Beware the consequences (however funny they are) of turning your engine off too early...

!!!

I'm too lazy to do it but if someone wanted to prevent this from happening... I suppose that instead of using a waypoint to execute the script... use a trigger instead, and attach it to the chopper (possible?) or place it on the pickup waypoint, same On Activation.

For the Condition, use "this AND [same condition here]". Probably group it to the CRRC also, and set it to Present. That way it will only fire off when the CRRC is at the actual pickup spot, you might be able to fine-tune it so it only activates when its inside the cargo area if you toy around with it.

Edited by JDog

Share this post


Link to post
Share on other sites

Cheers JDog, nice work :)

Would you do the same on land if you wanted to put a Humvee in the back? lol :D

Edited by konyo

Share this post


Link to post
Share on other sites

Would a humvee fit in there? I haven't tried lol... doubt it.

Share this post


Link to post
Share on other sites
Would a humvee fit in there? I haven't tried lol... doubt it.

Tryed it, it dosnt fit :( But a civilian car dose :bounce3:

Share this post


Link to post
Share on other sites

JDog love the script thanks. Its perfect for the mission I'm writing. One small problem though, how can I modify the swapseats.sqf to move the whole team into the chopper seats.

When I swap seats I go into a chopper seat no problem but the other three team members (AI's) stay in the boat which is inside the chopper but they are not in cargo of the chopper they're in the boat which is inside the chopper (if you get me).

I'm a newbie, so still trying to figure out scripting, so any help would be much appreciated thanks.

Share this post


Link to post
Share on other sites

Tried it with an osprey and the game doesn't like it at all, it goes crazy. dunno how else to describe it Anyway you can't walk or drive a vehicle into the back of an Osprey, even if you animate the doors, because of the collision detection on an osprey. Which is the nice thing about the Chinook mod, you can walk or drive anything that fits up the ramp, once in you can use the attachto command.

Share this post


Link to post
Share on other sites

Padjur, if you're using moveInCargo it should place them in the cargo seats. If it isn't working making try placing a "sleep .25;" between each moveInCargo line of code.

Also, so you know... if you are in any of the vehicle passenger indexes of the Chinook (not attached but in an actual seat)... it will appear from your seat as if the CRRC is just outside the ramp, when it's actually inside. It sucks, but it won't render it as inside right next to you.

Also... updated this at the top, for attaching only when inside (so turning the engine off 100 feet away wont result in a flying boat. Just add in this the pick-up waypoint of the chinook, instead of JUST isEngineOff:

!isEngineOn pbx AND pbx distance helios < 5

Share this post


Link to post
Share on other sites

Thanks JDog for replying. Understand about the rendering, no problem.

Thanks for the update on the flying boat.

Tried several different ways to use moveincargo but no luck with it. I'm doing something wrong but I don't know what. Could you show me where to put the moveincargo for the other units. Sorry my knowledge of scripting is still pretty basic, I'm not sure how to write it in the code.

_object = _this select 0;
_caller = _this select 1;
_id = _this select 2;
_heli = _this select 3;

_object removeAction _id;
_caller setPos position _caller;
_caller moveInCargo _heli;

Share this post


Link to post
Share on other sites

I haven't really played with the forEach statements and stuff but the simple way... if each unit in the boat is named, just add this onto that:

[i]member1Name[/i] moveInCargo _heli;
[i]member2Name[/i] moveInCargo _heli;
...

Perhaps I'll update the script so it will move the driver into the main seat as well as the rest of the passengers into cargo seats, then I'll just re-release the script. Wouldn't be hard. If I have time I'll do that and post it here, but what I just posted should work.

Share this post


Link to post
Share on other sites

No I've tried assorts of combinations last night,this morning and this evening and it doesn't seem to work JDog. In the mission I'm making the team is extracted after their raid and then given a new task while in the chopper before they get back to base. Its nice because it flows without any cut to a new scene stuff. While flying to the drop zone, players have a chance to look at the new mission and arm or rearm on board the chopper and then HALO drop to their next target. This is the problem though, I want them in the cargo seats of the chopper because they will die when ejected from the chopper if their still in the boat. Tried it loads of times and they die every time, I die too if I stay in the boat so I'm sure that's the problem. I'm trying to learn as fast as I can about scripting because it is so powerful in mission editing and although I kinda know what this script is doing (two weeks ago I'd just go cross eyed at it) I'm not sure how to adapt it. I hope you find the time to come up with something because this is a great Idea with the Chinook which is a great piece of kit, especially for covert, special forces stuff. In the meantime its back the forums and picking scripts apart to see what I can learn.

Share this post


Link to post
Share on other sites

I'm sure you coulda got it to work lol, there aren't too many ways of going about doing this. Anyway, I just replaced the last 2 lines in that block up there with this:

{_x setPos position _x} forEach units group _caller;
{_x moveInCargo _heli} forEach units group _caller;

That did it. Here's the updated version/script/map with this change and the no-flying-boat change. Updated in first post too.

http://www.filefront.com/14258907/chinookExtract.utes.rar

Share this post


Link to post
Share on other sites

Thanks for that JDog, it works perfect, good man.Obvious now I know, that's answered a lot of questions about scripts . You can read and re-read stuff over and over again and never really get it but when your shown how to do it with an actual problem that you trying to solve, it clicks and becomes clear, much appreciated. thanks again :thumb:

Share this post


Link to post
Share on other sites

Here's another video of this script in action. All units and vehicles are part of a new mod called "Reality":

<object width="425" height="344"><param name="movie" value="http://www.youtube.com/watch?v=Wsq8ol9XJPY&hl=en&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/watch?v=Wsq8ol9XJPY&hl=en&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>

:butbut: :p

Share this post


Link to post
Share on other sites

Wow not a bad looking mod, graphics are almost as good as what I run it at :P

Share this post


Link to post
Share on other sites
Here's another video of this script in action. All units and vehicles are part of a new mod called "Reality":

Wow, reality does stuff like in video games. :butbut:

Share this post


Link to post
Share on other sites

Sorry for dusting off an old threath but I didnt want to open a new one for this quick questing:

Can this be reversed? Start with the boat in the chopper and be infilled?

A little like this:

And how ofcourse.

Share this post


Link to post
Share on other sites

Man you are quick!

Would it be possible to start as the crrc driver in the back of a chopper (ch53/chinook) and than be casted by a AI pilot?

I don't want to be a pain in the ***, thanks for the help so far!

Share this post


Link to post
Share on other sites

Not with that system as designed, but you could possibly script that kind of thing.

Share this post


Link to post
Share on other sites

That would actually be pretty easy. Just attach the boat to the bird, fly out to where you want it and detach it, then drop the guys in.

The main problem is dropping the guys in will kill them unless you're like 2m off the water. So kinda lame and kinda dangerous. My system just setPos'd them away from the bird, so not quite immersive as falling into the water but safer.

I also didn't build in any limits, so you could drop them from 1km up and they'd be fine, but that's since this system was for use with player pilots who would position the helo properly before using that command.

Share this post


Link to post
Share on other sites

It is possible to do what you want with an AI pilot, but its very sensitive to having the boat jitter around on the way out the back. I did it right around the time I originally posted this, here:

jQMempWjw8w

I don't have the mission files any more but I'm pretty sure it was just a mixture of flyInHeight and figuring out where is the best/most reliable place in the cargo hold to use attachTo.

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  

×