Jump to content
Spartans Home
Sign in to follow this  
{CtC}+Doc+

Helicopter insertion - How To:

Recommended Posts

Hello this is the code for a helicopter insertion:

 

function onMissionStart()

OFP:setVehicleMountableStatus("seahawk",1)

OFP:isAllMounted("Echelon", true)

OFP:move("pilot", "waypointp", "ADDTOFRONT")

end

function onArriveAtWaypoint_seahawk_waypointI2(entityName, waypointName)

OFP:land("seahawk", "ADDTOFRONT")

end

function onLand_seahawk(helicopterName)

OFP:dismountVehicle("weng", "OVERRIDE")---this is your other teammates

OFP:dismountVehicle("verwayne", "OVERRIDE")--this is your other teammates

end

function onDismount_seahawk_player1_Player(vehicleName, UnitName, echelonName)

OFP:isAllMounted("Echelon", false)

OFP:addTimer("timer1", 5000)

end

 

function onTimer_timer1(name)

OFP:move("pilot", "waypointI3p", "ADDTOFRONT")

OFP:removeTimer("timer1")

end

 

Create a chopper, add pilot, gunner etc... name it "seahawk"

Create an echelon for your chopper = Echelon

create your team name your team Player

Your player = player1

 

Create a series of waypoints make sure to add chopper height for how high you want the chopper to fly.

 

Say at waypointI2 you want the chopper to land. This is your final waypoint in this series.

 

Create a new series of waypoints for your chopper to take off and go to. this is waypointI3p. (the p after waypointI3 indicates a path or more than one waypoint)

 

done..

 

Hope this helps...

 

Doc

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...