Jump to content
Sign in to follow this  
CurryMaster

Troubles with Helicopter Extraction

Recommended Posts

Hey Gang!

First time on the forum as a member,so be gentle, but rest assured I've been nose-diving A-10s into the floor/trees/Nimitz since the cold war.

I'll Try to keep this brief, but please forgive me for listing all that i am sure to have done right, which i have learned from here amongst other exalted reaches of the WWW,

so if you see something that you worked out for yourself and then posted then in all fairness i have copied your hard work.

//Task

//The player and his group wish to call for an extraction helicopter on the player's location. he does this by throwing a smoke grenade.

//the group consists of

//CZA = player, as a team leader he has a smoke grenade, making addMagazine redundant.

//MEDIC = an AI, my medic is always indestructible, but for arguments sake he may not be.

//CZA in his init line executes one script by the syntax _nul = [this] execVM "script.format";

//MRK001.sqf = named CHECKSMOKE

[] spawn {

while {not isnull CZA} do { "CHECKSMOKE" setmarkerpos getpos CZA; sleep 0.5; };

};

//CZA also has the init line

helipad attachTo [CZA,[0,20,0]] //this is sometimes awkward, presumably if turning to face enemy, but can be lived with.

//I then have a trigger named EVAC, which is grouped by F2 to CZA, used to make helicopter move to the helipad

condition = ((count ((markerpos "CHECKSMOKE") nearObjects ["SmokeShell",50])) > 0)

//this activates Waypoint2 (LOAD) for helicopter moving it to the helipad upon which

helicopter land "helipad"

//CZA and MEDIC then mount, this activates Waypoint3 for helicopter

((!alive CZA) OR (CZA in helicopter)) AND ((!alive MEDIC) OR (MEDIC in helicopter))

now because Waypoint2 was a LOAD , that means Waypoint3 must be directly next to Waypoint2 to start the helicopter's engine and head to Waypoint4 (home free)

I now have two problems related to where I throw the smoke

1) If EVAC is activated within line of sight of helicopter, it moves to the invisible helipad 20 meter in front of CZA, lands and shuts down, and depending on proximity to Waypoint3 may or may not take off again.

2) If EVAC is activated beyond line of sight of helicopter, it will move to where the helipad is placed in the editor and not on CZA's position.

I think settling for a designated LZ or EZ could be taken with a pinch of salt, however i would like the possibility of having to scout a proper location base on how much you have provoked any enemy hunter killer teams.

Thanks for taking the time to read this even if you cant help, and if we do find an answer, feel free to change the title to something more fitting of the solution.

Share this post


Link to post
Share on other sites

Well, I've asked Xzibit if he knows how and he was all like...

"Yo Dawg, I heard you like scripting! So i put a script in yo script, so you can script while you script!"

and it all made sense.

Share this post


Link to post
Share on other sites

Maybe check the script collection from Ghost. It has, or should have, a helicopter extraction script I'm using. The only thing it doesn't has is the landing near a smokeshell. But eventually that could be added.

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  

×