OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: modderman on 03 Jul 2005, 19:21:56
-
In a mission Im making, I am trying to move the pilot into a missile so he can guide it, and move the gunner into the pilots seat to control the Helicopter while the pilot is busy.
The problem is, I eject them from the aircraft and they go into a parachute, and can't be moved out...
_heli = _this select 0
_missile = _this select 1
_unit = driver _heli
_gunner = gunner _heli
_unit Action ["Eject",_heli]
_unit moveindriver _missile
_gunner Action ["Eject",_heli]
_gunner moveindriver _heli
exit
Also is there a command to make the players input be inacted on another unit, so that the player is techinically controlling another unit?
there is the switchcamera command, but it dosn't switch over the players control to control a missile
-
setPos them out instead of ejecting them.. you might not even have to do that, just moveinDriver MIGHT work.
-
unitname action ["movetodriver",vehiclename]
That might work.
Planck
-
I would try:
unassignVehicle Pilotname
Pilotname assignAsDriver missilename
Pilotname moveindriver missilename
unassignVehicle Gunnername
Gunnername assignAsDriver choppername
Gunnername moveinDriver choppername
Then when you want to put the pilot back
unassignVehicle Gunnername
Gunnername assignAsGunner choppername
Gunnername moveinGunner choppername
Pilotname assignAsDriver choppername
Pilotname moveinDriver choppername
Not tested, and there may be some un-necessary stuff there.
Bear in mind that the pilot and the gunner will remain in the same group troughout and I presume there for that the chopper will follow the missile.