Home   Help Search Login Register  

Author Topic: How can I make the chopper to abort unloading troops if the BMP is destroyed....  (Read 1083 times)

0 Members and 1 Guest are viewing this topic.

AMD_ROCKS

  • Guest
Ok.  Scripts are foreign to me, but I will do one just for this.  Problem is I do not know how to.  Or perhaps I can get away without using one.

I will explain what is suppose to happen in this mission.

Here is a list  of objects that are involved:

Mi-17 gunshipA
pilot of Mi-17 pilotA

3 x spetnaz (the bodyguard of VIP) groupthis= spA
3 x spetnaz (the bodyguard of VIP) groupthis = sp1
1 x officer (the main target) VIP

BMP2 (the BMP that the spetnaz will get in after the Mi-17 drop them off) VIPBMP
BMDR (the armour car that the VIP will get in after the Mi-17 drop him off) VIPCAR

Alright, with the vehicles/chopper and their respective name spell out.  Let me begin.

The BMP2 will driver from a town (the map is MALDEN), to a location where it looks like a beach.  Then it will activate an area trigger, for which the area trigger will call the pilotA to GETIN the gunshipA and load the sp1 and spA and VIP.

The gunshipA will now fly to the beach area and drop off all the sp1, spA and VIP.  The gunshipA will then fly back home.  Meanwhile the sp1, spA and VIP will GET IN the VIPBMP and VIPCAR.

Now, here is the twist.

The player will have multiple chance of killing the VIP.  The player can shoot him as he get off the chopper, the player can blow up the BMP and force the chopper to abort his landing and go to another location to land and drop off the speztnaz and the VIP.  Or just RPG the chopper, one clean shot and mission accomplish.

But forget about RPGing the chopper. If the BMP is destroyed, then the pilotA will abort landing and land at LZ2 (LZ2 is the secondary landing spot).  Which lead to an embush from the West team whom waited for the VIP and gunship.  The West team will proceed to kill everyone in the chopper, including the crew member.


Inorder to achieve the above effect, I have set up alot of triggers.

1.) one tigger controls the chopper, flown by pilotA (pilotA domove getpos LZ1)  LZ1 is the invisible H by the beach

2.) 3 trigger controls the 2 speztnaz team and the VIP (hence 1 trigger for each).
sp1 leaveVehicle gunshipA
spA leaveVehicle gunshipA
VIP leaveVehicle gunshipA

3.) this trigger suppose to cause the pilotA of gunshipA to go like "OH SHIT! ABORT LANDING!!!", if the BMP (VIPBMP) or the BMDR (VIPCAR) is wrecked.

condition: not (alive VIPBMP) or not (alive VIPCAR)
activation: pilotA domove getpos LZ2 (LZ2 is the secondary landing location for the pilotA)

the problem is....

Once the chopper begin to settle down and drop off the passengers.  It will not stop the action!!

I decided to test this out.

I RPG the BMP (VIPBMP) and yet the pilotA still land "hover" and let out the damn VIP and the 2 spetnaz team.  >:(  :o  ???

Neither the chopper did follow the tigger (if bmp destroyed, then doMove to LZ2).  He continue as if nothing happen, everyone came out, and looks around like a bunch of sitting ducks.  :D

Yeah, I know the player can then RPG them too.  But that is not the point.  >:(

I want the chopper to abort whatever he was doing and hurry his ass to LZ2.  Which will be his last stop ever.

Can anyone help me on this one?  I am patient and will send the mission to you if you would like.  I have worked all that I can.  But now I am really stuck.  I left the same question in OFP.org but no luck.

Thanks man.  Cheers.  :-[ :-[















« Last Edit: 26 Jan 2004, 06:03:42 by AMD_ROCKS »

AMD_ROCKS

  • Guest
bump.

Man, I am still working on this.  No luck.  Did those Game Logic and trigger stuff.

I learned something about how to use Game Logic, but the chopper is still not doing what I want.

Help..

deaddog

  • Guest
Yep, once a heli executes the "land" command or it's unload waypoint, there is no way I know of to stop it.  Try this:

http://www.ofpec.com/editors/resource_view.php?id=316

AMD_ROCKS

  • Guest
Thank you to deaddog for helping.   :)

HEY GUYS, THIS IS STILL AN UNSOLVED MISTERY!!  ???  >:(

Syniper, anyone out there.  Please, help me out.  

The goal is to stop the chopper from unloading.  

I thought of the alternative of stopping the chopper directly, make be we can do something with the spetnaz soldiers and the VIP (please read my first post to get the complete picture).  Is there away to CANCEL the spetnaz and VIP's "disembark" action OR "leaveVehicle" action in the middle?

I will be patient and post what have I found, but please don't ignore this one folks.  It might benefit just about anyone of us who are interested in mission making.
« Last Edit: 24 Jan 2004, 20:36:14 by AMD_ROCKS »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
I don't know how to interrupt a command that is being carried out either.    There's a good chance it isn't possible.    

Your best bet is probably to try and disrupt the command in some way:  move the waypoint and invisible H, perhaps, in the hope that the chopper will start to fly there.     Maybe setDammage 1 the loons still in the chopper so they can't get out.   Perhaps deleteVehicle the pilot and setpos in a new pilot with new commands.    

I daresay to solve this one you are going to have to apply lots of a) imagination and b) time.

Alternatively, create a workaround by rethinking the plot/objectives of the mission.    Perhaps once the chopper arrives its too late and you lose the mission.
Plenty of reviewed ArmA missions for you to play

deaddog

  • Guest
Instead of using unload and getout waypoints, you simply need to script the chopper landing and use the "eject" action for each unit.  Between ejects, simply check if the conditions have been met to stop the unloading.  If so, have the already ejected guys get back in and take off.

If you will actually look at the link I sent you, you will notice that it is possible to abort the helicopter landing while it is in progress.  Once the heli is landed, you need a script to "eject" the guys, etc......

AMD_ROCKS

  • Guest
Hey folks, listen.

I got creative and made a chopper using 98 percent trigger to have it did what I want!

You have to see this.  I did it without script.

I know deaddog recommand the script, but the problem was this.

It was not about stopping the pilot from landing, it was the command I used in the trigger namely

"_x leaveVehicle gunshipA" forEach units sp1  

That is the actual command that cause the pilot to land.  I have already successfully made the pilot to ABORT the landing by setting each trigger to display a hint message.

I discovered that it is possible to set 2 triggers inorder to have the pilot to abort.

First off, I use an empty chopper and pilot combo.  Second, I used a Mi-17 with no gunner.

I direct the chopper to fly to the destination, which in my case is the BMP.  Note **** I found out another thing that the name is very important.  Do choose to use the object the pilot is flying for the following command.  With Mi-17 named as gunshipA and pilot named as pilotA

gunshipA domove get pos BMP
gunshipA flyinHeight 5
gunshipA domove get pos LZ2  ... etc  so on.  That method works accurately then using

pilotA domove get pos BMP ... etc.  Get my point?  I am not the best in this, let's just say that there IS indeed a steep learning curve in this.  Most of them is not creating scripts or somewhat not, but is time like this that one have to work AROUND the problem.  

Ok, so the chopper get a command in the trigger to fly towards the BMP.

I set an area rectangular shape box.  Strategically positioned it so the chopper will fly into the box and activate alot of other triggers that not worth mentioning (too many).

Then trigger 2 basically say" IF BMP is destroyed, gunshipA domove getpos LZ2"

That was all.  I saw the chopper coming down to land at the first LZ (or LZ1 as I named that invisible H), it jumped up, and flew towards the LZ2 direction.

So there we go, problem so-what solved.  It flew to the LZ2, drop off the folks and flew back home.  Not bad for a scriptless action.

If anyone care to see how I did it.  Reply here and I will send it to you via email.  

Thank you all for helping, this board make OFP more enjoyable.  :)