Jump to content
Sign in to follow this  
TBKoen

Arrowhead Helicopter won't extract

Recommended Posts

Hey guys,

I wanted to make a helicopter extraction like this:

But it won't extract on the (player in helicopter) condition. I've also reproduced it in Arma 2 and it worked.. and triple checked it in arrowhead.

Any idea's?

Share this post


Link to post
Share on other sites

i dont think anybody wants to watch the 8 minute long video, trying to find out which kind of extraction you want, maybe be a bit more precise?

Share this post


Link to post
Share on other sites

There's been probably 8 helo extraction/insertion threads lately, and that video shows you exactly what to do to get one to work.

Share this post


Link to post
Share on other sites

I call in a chopper to pick me up, make it land with a land command on a helipad, but it won't trigger the next waypoint when these conditions are met: ((!alive player1) OR (player1 in chopper))

But it worked in arma 2.

---------- Post added at 05:50 PM ---------- Previous post was at 05:49 PM ----------

There's been probably 8 helo extraction/insertion threads lately, and that video shows you exactly what to do to get one to work.

It worked in arma 2 but not in arrowhead.

Share this post


Link to post
Share on other sites
It worked in arma 2 but not in arrowhead.

It works in OA just fine. I sat through that whole video and did all the steps exactly as he has them (even though they are much better ways of doing it) and it worked flawlessly. :)

Did you do what was written in red during the video, what was in the comments of the video or what he actually did in game in the video?

Share this post


Link to post
Share on other sites

Thanks for the trouble!

This is very bizar. Tried it again just to be sure. But same again. I'm sure i got the codes correct since it did work in arma 2 for me and i tried about 4 times now in Arrowhead.

what would be a good alternative? I want to be picked up at a set spot and dropped off at another set spot, then the chopper may fly off

Share this post


Link to post
Share on other sites

I'll write up a demo mission once I'm off this silly conference call. :)

Share this post


Link to post
Share on other sites

Sorry, got busy after my call. So here's one of many ways of doing this. You can download this demo mission from the intertubes.

Place your Functions Module hStart and hEnd markers where you want the helo to spawn and where you want the player's group to be dropped off. Place a Radio trigger with:

nul = [player] execVM "plannedExtraction.sqf";

Then the plannedExtraction.sqf is:

//////////////////////////////////////////////////////
//  From trigger:
//  nul = [player] execVM "plannedExtraction.sqf";
//
//  Pre-place "hStart" and "hEnd" markers on the map.
/////////////////////////////////////////////////////

// Wait till the Functions module is ready.
waituntil {!isnil "bis_fnc_init"};

// Declare everything.
_unit = _this select 0; // who called it.
_chopperType = "CH_47F_EP1";  // Type of transport.
_start = getMarkerPos "hStart";  // location of start/spawn/delete location.
_end = getMarkerPos "hEnd";  // location of drop off.
_landPos = [_unit, 20, getdir _unit] call BIS_fnc_relPos;  // location of pickup, 20m in front of caller

if (isServer) then {
// message letting them know it's coming.
hintSilent "Extraction chopper inbound!";  

// Create a little shiney ball we can use to get the direction from start to caller with
_blinky = "Sign_sphere10cm_EP1" createVehicle _start;
_flightPath = [_blinky, _unit] call BIS_fnc_relativeDirTo;		

// Spawn the helo, facing the user, in the air at the start location.
_ch = [[_start select 0, _start select 1, 50], _flightPath, _chopperType, side _unit] call BIS_fnc_spawnVehicle;

// Name the helo globally so that waypoint orders will work.
transporthelo = _ch select 0;
_chGroup = _ch select 2; // group of helo so waypoints work.
_chGroup setBehaviour "CARELESS"; // Make sure they don't get distracted.
// transporthelo setCaptive true; // uncomment this to make your ride safe.

// These lines might be needed in MP. :)  Didn't test it yet.
//	_ch select 0 setVehicleInit "transporthelo = this; this setVehicleVarName ""transporthelo""";
//	processInitCommands;

// Delete the cute little light that let us spawn facing the right direction
// and create landing spots for pickup and dropoff.
deleteVehicle _blinky;
_lzPickup = "HeliHEmpty" createvehicle _landPos;
_lzDropOff = "HeliHEmpty" createvehicle _end;

// Give the helo a waypoint to where the player is and make it land, engines on.
wp0 = _chGroup addwaypoint [_landPos, 20];
wp0 setwaypointtype "MOVE";
wp0 setWaypointStatements ["","transportHelo land ""GET IN"""];

// Wait till the player's group is in the helo.
waitUntil{{_x in transporthelo} count units group _unit == count units group _unit};

// Once they are, off we go by setting a TRANSPORT UNLOAD waypoint.  
// It'll auto boot the leader once there, but he'll have to tell the others to get out.
wp1 = _chGroup addwaypoint [_end, 20];
wp1 setwaypointtype "TR UNLOAD";
wp1 setWaypointStatements ["","transportHelo land ""GET OUT"""];

// Wait till the player's group is out of the helo.
waitUntil{{_x in transporthelo} count units group _unit == 0};

// Once they are out, set a waypoint back to the start and clean up by deleting the helo and landing pads.
wp2 = _chGroup addwaypoint [_start, 20];
wp2 setwaypointtype "MOVE";
wp2 setWaypointStatements ["true","{deleteVehicle _x} forEach crew transporthelo; deletevehicle transporthelo;"];
deleteVehicle _lzPickup;
deleteVehicle _lzDropOff;
};

Share this post


Link to post
Share on other sites

Oh man can't thank you enough. It works and very clear so i can mess around with it myself and learn. Thx

Share this post


Link to post
Share on other sites

No problem at all. I had started working on switching it over to using the new Communication system, but need to work out locality and all that. :)

Share this post


Link to post
Share on other sites

Hi kylania,

currently trying to get plannedExtraction.sqf working in OA. No luck ie nothing spawns. Have you tried on OA?

changed _chopperType = "UH60M_EP1";

//waituntil {!isnil "bis_fnc_init"}; commented out as it does not get past this.

then commented thing_blinky not in OA

// _blinky = "Sign_sphere10cm_EP1" createVehicle _start;

// _flightPath = [_blinky, _unit] call BIS_fnc_relativeDirTo;

Changed _flightpath to 0

_ch = [[_start select 0, _start select 1, 50], 0, _chopperType, side _unit] call BIS_fnc_spawnVehicle;

still working away.

edit: just checked armaholic index Sign_sphere10cm_EP1 seems to be in OA. So adding flightpath bits back in.

Edited by cream-t

Share this post


Link to post
Share on other sites

It was written in OA, so it should work fine. Make sure you have the Functions Module on the map, which would be why the waitUnitil never fired. Though no idea why the spawnVehicle thing would work if the bis_fnc_init didn't...

The whole flightpath thing was just so it would be pretty, setting it to 0 would be fine really.

Share this post


Link to post
Share on other sites
It was written in OA, so it should work fine. Make sure you have the Functions Module on the map, which would be why the waitUnitil never fired. Though no idea why the spawnVehicle thing would work if the bis_fnc_init didn't...

The whole flightpath thing was just so it would be pretty, setting it to 0 would be fine really.

Thanks just worked out the functions module and it worked a treat. Maybe add a note for noobs.

Share this post


Link to post
Share on other sites

The first line of the example post says, in bold, to place the Functions module. :)

Well, it did, but it was misleading! I've changed it to be more clear now. Sorry heh

Edited by kylania

Share this post


Link to post
Share on other sites

I have to say this is a very impressive script! I tried for ages to make a chopper land under fire, this scipt does it every time!

Just a couple of questions though.. (nub alert, I know ;))

Would this work in Arma 2? & if it does where can I find a list of vehicle names to change the type of helo?

*Edit... is there anyway to make helo fly higher?

thx :)

Edited by Signaller
forgot question

Share this post


Link to post
Share on other sites

The Arma 2 Object Class Library sticky thread has great links to object databases including names and pictures of everything for both Arma 2 and OA.

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  

×