Home   Help Search Login Register  

Author Topic: Helo insertion, what am I doing wrong... (Also long time no speak)  (Read 2773 times)

0 Members and 1 Guest are viewing this topic.

Offline B2KDragon

  • Members
  • *
    • Dogs of War
Ok, so here is exactlly what I am doing. Please tell me were I am going wrong here.

Quote
1. First go to nonplayable, empty, objects, and insert a visible or invisible H (helipad) where you want to the helicopter to land.

2. Place a transport helicopter on the map where you want it to start flying from, I used a MH-60S seahawk. Name it as: helicopter

3. Type helicopter flyinheight 85 in the initialization. You can put any height number in.

4. Place a MOVE waypoint next (very close) to the helicopter.

5. Synchronize the first MOVE waypoint to whatever trigger you made (such as destroying an objective) that will cause the extraction to take place.

6. Next connect the MOVE waypoint to a LOAD waypoint placed on the helipad. In the ON ACT for the LOAD waypoint type:
dostop helicopter;helicopter land "land"
this forces the Helicopter to land on the helipad and turn off the engine.

7. Now place another MOVE waypoint right next to the LOAD waypoint (place it practically on top of it) In the condition for the MOVE waypoint type:

((!alive unit1) OR (unit1 in helicopter)) AND ((!alive unit2) OR (unit2 in helicopter)) AND ((!alive unit3) OR (unit3 in helicopter)) AND ((!alive unit4) OR unit4 in helicopter) AND ((!alive unit5) OR (unit5 in helicopter)) AND ((!alive unit6) OR (unit6 in helicopter)) AND ((!alive unit7) OR (unit7 in helicopter)) AND ((!alive unit8) OR (unit8 in helicopter))

What this condition does is it asks: Is the unite alive or dead? If he is dead then don't wait for him. If he is alive, is he in the chopper? If not then wait for him. Basically it checks to see if everyone is in the chopper before leaving to the next waypoints. You may need to adjust the condition to fit the number of units in the group for your mission. Also you should go to the group of infantry that you want to transport and individually name each one of them unit1, unit2, etc... so the Helicopter knows who you're referring to.

8. Now place the remaining MOVE waypoints that you want the helicopter to travel through.

9. Put a UNLOAD waypoint where you want the Helicopter to land. And an invisible helipad as well. For the waypoint under On Act type :
dostop helicopter;helicopter land "land"
to force the helicoper to land at the drop off point.

That is exactlly what I am doing, been trying to get this to work for the past hour.

I get it to land, but once I get in. Well, it just dosen't budge >.>

Any advice is MUCH appreciated. Or if you have another way or getting a chooper in off a trigger, then landing us somewere and buggering off out the way again. I am interested in that too :)

P.S.

LOOOOONG time no speak Ofpec, how is it all going :)

Offline Pirin

  • Members
  • *
Running that through the editor there seems to be two problems.

1)  It's the doStop that's causing the bird to not take off again.  The 2nd MOVE waypoint is properly triggering, but you've told it to stop so it's not moving on again.  Since the doStop is not needed for this, just remove it from the onAct of the LOAD waypoint.  Also changing it from "LAND" to "GET IN" will keep the engines running in the bird, for a more exciting exfil!

2)  The condition of all the units can cause issues as well.  Do you have all 8 units named unit1 through unit8 on the map?  All I had in the demo I was working with was unit1 and with all the others in the list it just sat there waiting for non-existing units to not be alive.  So only check for units that exist.

Offline B2KDragon

  • Members
  • *
    • Dogs of War
Hey there, thanks for the quick advice.

Yes I do have all the units named from 1 - 8 and are present on the map. I will get rid of the doStop and let you know how it goes :)

EDIT:

Ok, so I tried it with the doStop command removed. I set it all up exactlly the same, however it still refuses to take off.

I even used just one unit and used ((!alive unit1) OR (unit1 in helicopter)) but still nothing.

Anymore ideas, I am stumped :\
« Last Edit: 07 Jun 2011, 11:59:19 by B2KDragon »

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Hi!

That's a terribly complicated condition for moving. Besides, all you need is a synchronized GET IN waypoint (for the infantry) and LOAD (for the helicopter) -> now the squad leader will order his men to enter the helicopter, the helicopter will land, and once they're loaded it'll continue in its waypoints.

The only problem is when you're the squad leader, or if you're in the group but alone - for the synch to work the leader has to order a subordinate to enter the helicopter, otherwise it will just hover and wait for all eternity (AI units can order themselves to enter a helicopter, but if you're alone you're out of luck). In this situation, doing the "land" thing that your instructions have given you will work better, except you do NOT NEED TO SYNCH ANYTHING in that case. But the condition is clearly overcomplicated. Instead, do this:

1) Name the group that is entering the helicopter by adding this in the group leader's init field:

Code: [Select]
group1 = group this;
Now group1 is the name of the group. Next, in the Condition field where you normally write that terribly complicated long list of !alives and so on, simply write this much easier command:

Code: [Select]
{vehicle _x == helicopter} count units group1 == {alive _x} count units group 1;
As you can see, the above command compares the amount of people inside the helicopter with the amount of people alive. Once the two match up (i.e., all living members of the group are in the helicopter), the condition is true and the chopper will take off.

Also, if this is just a quick extraction, you might want to use land "get in" instead of land "land"; then the helicopter will hover just above ground and wait for you to get inside before flying off. I don't think you need the dostop command either.

Hope that works.

And welcome back to OFPEC ;)

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline B2KDragon

  • Members
  • *
    • Dogs of War
Guess I am just old fashioned :)

To add a extra group to that line, as they are all in different groups (Sniper team, ambush team and so on) I would just do.

Code: [Select]
{vehicle _x == helicopter} count units group1 == {alive _x} count units group 1; {vehicle _x == helicopter} count units group2 == {alive _x} count units group 2;
?

Or is it something else.

Also, how do you mean I don't have to sync anything? I have it sync'd so that once I have cleared a town then the helo will land at said point. Should I not do this?

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
I meant you don't need to synch the load and get in waypoint if you use this system - however merely using a synched load and get in wp is the regular, simple way of getting this done, so if you can do it with just that I recommend it ;)

As to if you have more than one group, I suggest you use:

Code: [Select]
{vehicle _x == helicopter} count (units group1 + units group2) == {alive _x} count (units group1 + units grup2);
The important bit here is the (units group1 + units group2) - basically "units group1" just creates an array of all the units in group1, and by adding the two together you create a bigger array of all the units in group1 and group2, which you can then count using the same commands as earlier. :) The end result is the same.

Wolfrug out.

"When 900 years YOU reach, look as good you will not!"

Offline B2KDragon

  • Members
  • *
    • Dogs of War
Thank you very much, it all works.

Your help is very much appreciated Wolf.