OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: SEAL84 on 04 Sep 2002, 04:10:56

Title: Evacs made easy....maybe?
Post by: SEAL84 on 04 Sep 2002, 04:10:56
Hmmm.....I think I have a new, simple way of structuring an evac...check it out and tell me what's what here.

I was having a little fun whipping up quick chopper insertions/extractions on STT's Ia Drang island, and was having fits with the one problem that always manages to screw with me - actually getting extractions to work.  I have tried several missions involving chopper exractions and that was always a stumbling block.

I *think* I may have found an easy solution to it, finally.  I do have my doubts though.

I had a squad of Air Cav guys, labeled guy through guy3.  They have a generic "move" wp where the chopper will get them.  NOTE - I'm not the squad leader.

The chopper's name is Huey and it flies to a "load" wp, with [huey land "get in", huey lockwp true] in the on activation field.  It's other waypoint is off somewhere else.  The Cavalry unit's wp has ["_x assignascargo huey" foreach units group guy].  Rather than try syncing and load/get in wp's, I tried this.    

Then I set up four triggers, one for each man in the Cavalry squad.  In all their conditions is [guy in huey], all named sequentially.  In the on activation field I pasted [huey lockwp false] in all four of the triggers.  Now this seems too simple and too easy to me, but it works like a charm.  I wonder though...

Why couldn't I stick all the condtions in one trigger?  It didn't seem to get it when I said [guy in huey and guy1 in huey and guy2 in huey and guy3 in huey] all in one trigger, but without the brackets there.  Now all four of them check for the same thing, I guess.

Will this method NOT work if one of the guys is dead, or will OFP automatically throw out the condition since the guy is no longer among the living?

I'm reasonably sure that if I was the leader and ordered in the guys as the chopper sat there, the triggers would still have the same effect and everything would work the same way.

Am I missing something, or is it that easy?  I had to post this because the art of taming choppers has been beyond me for months, plus it seems a lot easier than a script I downloaded a while back that does the same thing, only with 3x as much work put into it.
Title: Re:Evacs made easy....maybe?
Post by: Sui on 04 Sep 2002, 07:07:09
Hmm... it's not too hard provided you don't overcomplicate things huh? ;)

I've never had any huge problem with chopper insertions/extractions, but I haven't used them that much...
However here's a few things I do know that some people may not:

Heli land "X"

There are a lot of misconceptions about the land command running around... when I use these (I'd rather use waypoints if at all possible), here's how I generally do it:
Also remember when you issue a land command, the chopper will look for the best spot it can see (in otherwords, a spot 2km in the wrong direction) to put down in. Unless you put a helipad (it can be invisible) where you want it to land. For dynamic scripted insertions/extractions, I find it easiest to createvehicle an invisible helipad where I want the chopper to land

Sync'ed Get In/Load Waypoints

I advise caution when using these... the thing to remember is that the infantry group at the get in waypoint must have hit the waypoint before the chopper hits it's load waypoint. Otherwise the chopper may fly straight past the load waypoint (as there is nothing to pick up... the infantry hasn't been told to get in yet) and you won't get your guys loaded. It sometimes happens that way ;)

Transport Unload Waypoints

These things are great. They get the chopper to land, and unload every unit riding in cargo (the exception being if the player is controlling the squad). No syncing to mess things up... simplicity means there are less things that might go wrong ;)

Chopper wait conditions

Sometimes you want to type something in the condition field of your choppers waypoint to get it to wait...  here are a couple I often use:
I generally find that the simpler the better. Simpler means there are less things to go wrong, and there are generally enough things chopper can do by themselves to screw things up (they fly worse than I do ;D)
Title: Re:Evacs made easy....maybe?
Post by: Kaliyuga on 04 Sep 2002, 07:11:08
Why couldn't I stick all the condtions in one trigger?  It didn't seem to get it when I said [guy in huey and guy1 in huey and guy2 in huey and guy3 in huey] all in one trigger, but without the brackets there.  Now all four of them check for the same thing, I guess.


Cool idea.. the only thing I have to add about putting all of them in one trigger is that I think the correct syntax for that command above should look something like this:

((guy in heuy) and (guy1 in huey) and (guy2 in huey) and (guy3 in huey))

not sure how one of em dying would effect this though since the condition will only be met when they're all in as far as I know
Title: Re:Evacs made easy....maybe?
Post by: Sui on 04 Sep 2002, 07:21:53
Try:

"_x in heli" count [guy1,guy2,guy3,guy4] == "alive _x" count [guy1,guy2,guy3,guy4]

Also, if you decide to use more units (or a whole group) you can easily add them into the two arrays...