Home   Help Search Login Register  

Author Topic: player boarding chopper  (Read 1473 times)

0 Members and 3 Guests are viewing this topic.

Offline Tom

  • Members
  • *
  • BMPs are my nemesis
player boarding chopper
« on: 24 Aug 2006, 09:08:40 »
I made a mission where the player has to hold his position until a blackhawk arrives to pick him up. But i dont know how to make the chopper land and allow the player to board, then fly off. (i want the player to be able to man the machinegun when the helo arrives). Whats more, is that when the helo reaches a certain point, it starts to take damage and the player and the crew have to bail out and reach the designated point on foot. And again, i have no idea how to do all this. Do i make the player join the helo crew so that he/she is under their command? Or do i use that assign script? Or any other method? Any help is appreciated.

Thanks in advance.
"In times of war, do not crave honour. Do not pray for order, amity or surrender. Ask only that you outlive the day."

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re: player boarding chopper
« Reply #1 on: 24 Aug 2006, 21:07:07 »
I suspect the reason you have had no replies is that getting an ai chopper to land for a human player is notoriously difficult to do reliably.  Could you not go to a cutscene as the chopper arrives and lands, fade to black, move the player into the chopper then fade from black?

EDIT:

I  have just had a play with this and think I have a solution.  The problem is that to get a chopper to land for the player the player has to be at a GetIn waypoint and you cannot guarantee that the player will go to exactly the correct place.  My solution is to move the waypoint to the player.

Try this:

Chopper has a waypoint where it waits until it is called in (set the condition field to  ChopperNeeded)
The next waypoint is a Load waypoint that is placed next to an invisible H.
The next WP is some distance away

The player has a GetIn waypoint that is synchronised with the chopper's Load WP

Create a radio trigger that is used to call the chopper.  The on Activation field should be:

ChopperNeeded = true;[group player,1]  setWPPos getPos player

This will release the chopper from the WP where it is waiting and will move the player's GetIn WP to the player's location.


(NB this assumes that the GetIn WP is the player's first wp. )

Have a look at the attached missionette
« Last Edit: 24 Aug 2006, 21:31:13 by THobson »

Offline Tom

  • Members
  • *
  • BMPs are my nemesis
Re: player boarding chopper
« Reply #2 on: 25 Aug 2006, 12:13:47 »
thanks mate, its appreciated. I will try this tonight and see if it works. Thanks again!
"In times of war, do not crave honour. Do not pray for order, amity or surrender. Ask only that you outlive the day."

Offline Tom

  • Members
  • *
  • BMPs are my nemesis
Re: player boarding chopper
« Reply #3 on: 28 Aug 2006, 06:16:47 »
I played around with the triggers and stuff, and it works. It even works when the player has more than one waypoint AND a squad with him. Which is good. But I was trying something.

The helo that comes to pickup the player only has one pilot. I had an empty UH60-MG with its name as 'chop1' and the pilot's init field was "this moveindriver chop1". It works, but instead of landing to pickup the player when the helo is called in, the chopper reaches the LOAD waypoint then flies off without bothering to land. I want the player to be able to get aboard the chopper and man the machinegun while the helo continues along it path. What am i doing wrong?
"In times of war, do not crave honour. Do not pray for order, amity or surrender. Ask only that you outlive the day."

Offline XCess

  • Former Staff
  • ****
Re: player boarding chopper
« Reply #4 on: 28 Aug 2006, 06:49:02 »
Try making it a normal manned helicopter and on the init ass the following deleteVehicle heloNameG. where heloName is the name of the helicopter, adding the letter G to the name would define the helicopter's gunner, and therefore, the command would delete the gunner, if i remember correctly anyway...

Also, you could try adding pilotName assignAsDriver heloName

The OFP AI is very strange sometimes :p

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re: player boarding chopper
« Reply #5 on: 28 Aug 2006, 09:23:49 »
Doing a deleteVehicle on a unit that is inside a vehicle does not work correctly.  It may in this case, I have not tried it, but is some cases I have had real problems.  I suggest you use the method that I have found to work with no problems.  In the init field of the chopper put:
[this] exec "RemoveGunner.sqs"

RemoveGunner.sqs should look something like:

Code: [Select]
_veh = _this select 0
_gunner = gunner _veh
unassignVehicle _gunner
_gunner setPos [0,0,0]
deleteVehicle _gunner
exit

Offline Tom

  • Members
  • *
  • BMPs are my nemesis
Re: player boarding chopper
« Reply #6 on: 29 Aug 2006, 12:59:24 »
hmmm i'll try that instead. Should work, and if it doesnt, then ive done something wrong lol. Will let you know.
"In times of war, do not crave honour. Do not pray for order, amity or surrender. Ask only that you outlive the day."

PetriHonka

  • Guest
Re: player boarding chopper
« Reply #7 on: 16 Sep 2006, 22:06:11 »
Have you tried using the hold waypoint method on a pilot, and when the radio is sent, have the pilot get in the chopper and carry on. Should work.

sharkattack

  • Guest
Re: player boarding chopper
« Reply #8 on: 17 Sep 2006, 13:49:19 »
i have a script created to do just that ... it used to be in the editors depot on the old site.. sharkshelo.sqs
if it isnt there i could  send you a demo mission of how to use the scripts..