Subject: Baldo_the_Don's Helicopter Methodology (Now with AI Fast Roping)
Member Is Offline
Mood: New Computer!
posted on 26-5-10 at 06:40
Baldo_the_Don's Helicopter Methodology (Now with AI Fast Roping)
I think we all agree that the quote about giving a fish vs teaching to fish has its merits. There's no doubt in my mind that it would be quicker for
me to just give people a map with my best helicopter work in it (and I have a few that'd do nicely, thanks), but in the end, I'd just be an
Like with .cin and .end. files. There's maybe three guys in the community that can make good ones. Everyone else gets these guys to do the .cin and
.end for them. So you end up downloading these maps with awesome cinematics in them, but the AIs don't move, all the waypoints are named "null" and
of course, the helicopters are at best functionally robotic.
So if you've been copying and pasting helicopter events, stop it. You're not helping yourself. Continue reading and I'll try to teach you how to
I own the game Comanche 4. I'm not bad at playing it, either. My philosophy toward DFBHD helicopter work is basically, "What can I do to get these
whirlies flying the way I would fly them?" Breaking it down from there, it gets structured pretty simply, although the details get complicated.
Note: Everything in the following descriptions will be labeled as found in the consumer MED, unless otherwise noted. If I'm not actually giving AIs
respawns or using the "Play Part Animation" action, I hardly ever use the unlocked MED.
First you need the parts: a helicopter, a patrol route, a landing route, and a landing zone.
My helicopters - Little Bird, Blackhawk or Pavelow - almost always get the AI Textfile "H_BHAWKF", "H_BHAWMP", or "Heli -- Blackhawk (no return
fire)". If there's any major difference between these, I've
yet to observe it. They default to WP Z, have a decent turn rate (very important!), and do not react to being fired upon (also very important!).
"Heli -- Blackhawk" turns a few degrees faster, but if it gets hit, it jumps a few meters, wanting to go to combat speed, then remembering it
can't. Plus, since it does react to incoming fire, you have to change the combat speed as well as the patrol speed, which defaults to 70kmh and
The other AI Textfiles will take fire all day and not skitter a bit, which is extremely important when you're using 3D area triggers as often as I
do. Many of my BH patrols were botched by the BH jumping out of the area trigger, triggering events at suboptimal times to disasterous results.
The main thing in my patrol routes is to ensure all the waypoints have a minimum 16m radius. Under circumstances, I'll change the waypoint Z for the
one trick or the other, but mostly I snap them to terrain because I generally have my heli patrols ignoring WP Z. That makes 'em nice and bouncy over
uneven ground, helping to dodge rockets and grenades.
The Landing Route
Where my helicopter magic really begins. The landing route has almost always three waypoints in a straight line, 8m above the landing surface. The
third WP has a 4m radius and is centered over the landing zone, and the other two WPs are positioned according to it. The second WP also has a 4m
radius and is placed at least 16m from the third. The first WP has a 16m radius and is at least 32m from the second.
The Landing Zone
Where my helicopter magic ends and is renewed. The LZ is a 3D area trigger from the landing surface up to 4m, and it's usually safest to make it
twice the size of the third LZ WP, that'd be 16m×16m. I like to to make it the same width and length as the passenger area of the heli, so that if a
player is not actually on board, he's not in the area trigger, either.
The FARP item at the LZ will put a big yellow H on the spin map, and a helipad tile will help denote the extent of the 3D area trigger.
Well, all the parts are in order, let's hook 'em up with events.
Events are what drive your helicopter patrols. If you don't like using events, don't add helicopters. Just don't. A helicopter without events
controlling it is not useful enough to be considered worth the CPU cycles.
I break the events for a helicopter patrol into two loops: The Landing Loop and the Patrol Loop.
The Landing Loop
I do this in four events, generally, and name them so: Preapproach, Approach, Land and Prep.
The preapproach starts the heli's alignment on the LZ, gets her to approach altitude, and resets the next three events in this loop. When the heli
reaches WP LZ 0, it changes patrol speed to 0kmh and follows WP Z. It stops dead in the air, turns to the next WP and lowers to 8m.
4 seconds after the first event the approach event triggers, changing the patrol speed to 20kmh. The heli creeps forward to WP LZ 1, aligning
perfectly on the third WP directly over the LZ 3D area trigger.
The 4 second delay is important! It gives the helicopter time enough to swing all the way around, no matter what heading it had when it hit WP LZ
When the heli reaches WP LZ 2, it changes the AI State to "Land", right in the LZ 3D area trigger.
After being in the 3D area trigger for 2 seconds, the AI State changes to "Follow Waypoint". Being at its final WP already, the heli simply sits
where it is, prepared to head out again. This also resets the first event in the Patrol Loop.
The Patrol Loop
The Patrol Loop has four events: Lift Off, Go, End, and RTB.
If the player, or Group 1, and the helicopter are both in the LZ 3D area trigger, the heli redirects to the first WP in the patrol route, changes
speed to 0kmh, and very importantly, resets the waypoints it has visited (more on this later), and it resets the next three events in this loop and
the first event in the previous one. The heli lifts off and turns toward the patrol route.
After 2 seconds, the speed is changed to 60kmh, and the heli goes. The 2 second delay gives the heli time to get 10m off the ground before it moves,
helping it clear any obstacles near the LZ.
When the heli reaches the end of its patrol, it resets the waypoints it has visited, redirects to the landing route, and changes speed to 0km. It
stops dead and turns toward the LZ.
After a 4 second delay, it changes speed to 60kmh. It returns to base, or RTBs. The 4 second delay is important to give the heli time to swing around
to face the LZ no matter where it is or which way it's facing.
The heli then gets back, hits WP LZ 0, and the cycle restarts.
You'll often hear admonishments from people about never triggering events with a heli reaching a waypoint. The reason for this is that they didn't
know about the "Reset Has Visited Flags, Group" and "Reset Has Visited Flags, SSN" actions. So the heli hits the landing WP and lands. You get on
it, it twitches a bit, then stops moving. Or it takes off, and when it returns, it hits the landing WP and hovers.
If you reset the "BH reaches WP" event, the BH remembers it has already been to WP LZ, and immediately triggers the event as soon as you redirect to
the waypoint it has already visited. That's why a good general rule is, if you redirect a heli, reset its waypoints, too.
Othewise, the BH thinks, "Okay, I have to land when I get to WP LZ. I've already been there, so I can land now."
I always assign a BH to a group, usually Group 3. I then trigger the events by the BH group, not the BH SSN. Think about this: Which would be easier
to scroll to, Group 3 or SSN 1479?
I also try to match up the group, waypoint and area trigger numbers. If the BH is Group 3, I'll make Waypoint List 3 the LZ list, and I'll make the
3D area trigger at the LZ area 3.
Below, you'll see the printed events from one of my typical BH patrols. Note that the lift off is triggered when mission variable 3 is greater than
9. You could also trigger the lift off by Group 1 (all players in DFBHD, including multiplayers, are in Group 1) or the player (SSN 10000) being in
the area trigger and delaying it 10 seconds, which would be about the same thing, except...
What if the BH is not on the ground in the area trigger? What if the player gets off after the lift off is triggered, but before the delay is over?
In answer, I call your attention to Event 8 and 9 below. You'll see Event 8 says that if the BH and a player are both in the area trigger, then
increase mission variable 3 by one. This resets immediately, so for every second the BH and a player are in the area trigger, variable 3 counts up.
Event 9 says if either the BH or a player is not in the area trigger, then mission variable 3 is set to 0.
This means that if a player gets on the BH, the countdown to lift off starts. If the player decides he'd really rather take the M60 instead of the
M249 and gets off the BH to fetch it, the countdown resets, the launch is stopped.
An added advantage of the variable controlled launch is that if you have a .wac file, then converting the events to use it are simplified.
If I include a .wac to control the BH, it increases the mission variable if someone's on the BH, and resets it if not. That's all. The lift off
event would get a trigger added so that the BH would have to be in the area trigger when the mission variable hits the launch number. The RTB event
would get triggers for if the mission variable is less than or equal to the launch number and the BH is not in the LZ.
This is also why the prep event resets the launch event and resets the count. If someone is still on the BH when it lands and the lift off event is
already reset, it'll take off immediately. This way, it actually touches down and waits before relaunch.
Other Interesting Info
The actions "Reset Has Visited Flags, Group" and "Reset Has Visited Flags, SSN" will not work on waypoint list 32 through 124. That means if a
heli lands by reaching WP 47-2, it won't take off again because you can't tell the heli to forget it has reached WP 47-2, savvy? (If I could only
describe to you the frustrating week I spent on this one map before I figured that out...)
Events From A Typical BH Patrol
Group 3 is the BH. The BH is assigned the AI Textfile "Heli -- Blackhawk (no return fire)". Waypoint list 3 is the LZ, waypoint list 4 is the patrol
Edit: Reworded the Other Interesting Info bit to make it clearer.
The consumer MED can't make the Blackhawk lower its rope.
This is how I do fastropings:
One fast rope Blackhawk
A number of Delta, SAS or Ranger AIs (10th Mountain AIs don't fastrope correctly).
A list of waypoints for the BH to follow to the drop zone (DZ).
A 3D area trigger at the DZ.
Special Ingredient Notes:
In the Item Attributes for the BH, change the BH's AI Textfile to "Helo - Blackhawk Z MP" (40kmh) or "Helo - Blackhawk Z
ignore enemies" (70kmh). This insures the BH defaults to WP Z and will not react to being shot at. Also, you won't need to change the Combat Speed
because these AI Textfiles don't have it.
If the BH is on Team Green, enemies will not fire upon it, but the AIs inside won't be able to shoot through its walls. If the BH is on Team
Blue, the AIs inside can shoot through the walls at enemies, but the BH itself will be a target.
With the AI Textfiles above, ensure that the waypoints are high enough. The last waypoint is best between 21m or 22m above the surface the AIs
are dropping to.
The 3D area trigger should cover the entire DZ. The top should be 4m above the surface.
Make sure that you slow the BH down before it gets to the WP over the DZ.
When the BH hits that WP, change its AI to "Play part animation #1 for 2.0000 seconds" and send your first roper down with the action "Find
and use SSN," using the BH's SSN.
When the first roper is in the 3D area trigger, tell him to "Find and use SSN 0," which makes him let go, and send the next roper to find and
use the BH's SSN.
When that roper is in the 3D area trigger, tell him to "Find and use SSN 0," and send the next roper to find and use the BH's SSN. Repeat as
often as necessary.
When the last roper is down, tell the BH to "Play reverse part animation #1 for 2.0000 seconds" and make it leave the DZ.
Keep in mind that these are only some of the steps I've refined through lots of experimentation, but not all of them, and there's all kinds of
things you could do differently.
Group 1 is the player
Group 2 are the 4 AIs (SSNs 1 through 4)
Group 3 is the BH (SSN 5), directed to Waypoint 3,0 in its Item Attributes
Area 1 is the 2m×2m×2m 3D area trigger around the player WP
Area 2 is the 16m×16m×4m 3D area trigger at the DZ
Waypoint List 1 is the player's WP (1 WP, 1m radius, named Alpha)
Waypoint List 2 was going to be for the AIs (not used)
Waypoint List 3 is the DZ (See WP LZ above, set to Z: 22m)
Waypoint List 4 is the BH patrol route for after the drop
The AI fast roping, as scripted above, takes about 13 seconds from rope down to rope up. This can go quicker or slower depending on the position of
each AI in the BH when it reaches the DZ.
You can trigger these events by timing the delays on each one. I trigger these events with the 3D area trigger at the DZ because it goes much
more smoothly. The AI animations are not clockwork, and the one or the other teammate may take more or less time to get on the rope and down it, so I
prefer to trigger these events by where each guy actually is as opposed to where he's supposed to be at a given time.
The Z factor: there can be no more than a 19m difference between the WP Z (BH Z) and the top of the 3D area trigger at the DZ. The rope extends down
only a certain distance, and if there's any more than 19m between the top of the 3D area trigger and the BH's MED center point (as dictated by the
WP Z), the AIs won't make it into the 3D area trigger, and the events will fail.
With the BH 21m to 22m above the drop surface and the top of the 3D area trigger 4m above the drop surface, the rope stops 1m or 2m over the drop
surface, and generally, the AIs jump off the rope a little quicker.
The BH can be lower than 21m for a drop if the 3D area trigger goes far enough under the drop surface. I tested the mission above on the flat
terrain with the BH at 15m and the 3D area trigger all the way down to absolute 0. The AIs slide all the way down to the end of the rope, well into
ground, but if they're still inside the 3D area trigger, they'll pop back out when they have to. It does look really weird, though, and actually
That is a fine tutorial Baldo and I want to thank-you for sharing your ideas with us.
I have a request ( hehehe )
could you make a .mis file ( TDM) that whould wait for a player ( either red or blue ) to embark a helico and take-off and then land at a certain wp?
i know you need area triggers and all and since i'm new at this, somethime looking at the way waypoints aet set, radius of wp etcc... to me it
whould be great help
Member Is Offline