Home   Help Search Login Register  

Author Topic: How can a Chopper appear?  (Read 1673 times)

0 Members and 1 Guest are viewing this topic.

Offline ahmed117

  • Members
  • *
  • The 3d!t0R -=I.S.I=-
How can a Chopper appear?
« on: 17 Jan 2012, 17:14:46 »
I have another question, that I want a chopper to appear when the player enters a certain range of a sensor?Example. When a player reaches the airport, I want to place a sensor, and when I enter the range of sensor, a C130 plane full of soldiers will appear and land that airport... How is it possible.?
The 3d!t0R            -=O.F.P.E.C=-                                                         -=I.S.I=-

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: How can a Chopper appear?
« Reply #1 on: 17 Jan 2012, 19:22:14 »
I don't think there's an easy way to create a C130 in midair full of troops. It would probably mean messing around with 'setvelocity'.

You could have the chopper/c130 placed elsewhere in the map, away from where the action is taking place, then place a waypoint synchronised with the sensor trigger, and then put another waypoint near the player's position.

The trigger would have to be grouped to the player I believe.

The reason why it's very hard to create a chopper or plane in midair is because the vehicle is always created on the ground with it's engine off. I tried to create an A10 in my Operation Rattlesnake mission but in the end I decided the best way to do it would be to have the plane in the mission at the start, but far away from where the action is.

Hope this helps

Gruntage

EDIT: To prevent confusion, I was talking about the usage of the 'createvehicle' command..
« Last Edit: 17 Jan 2012, 19:56:39 by Gruntage »
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Re: How can a Chopper appear?
« Reply #2 on: 17 Jan 2012, 19:49:52 »
In addition to what Gruntage said, I would like to dare saying it is easy and can be done in two long steps:

- Making C-130 and units: you just create in editor your C-130 plane, name it "plane", set 0 (zero) azimuth, set "flying" special and choose a high rank (e.g. colonel, captain etc.); then you create all passenger units and, for everyone of them, you set "cargo" special, choose a low rank (e.g soldier, corporal etc.) and group it with C-130. Once you get plane and units grouped together, within editor environment you drag the whole stuff above the sea (preferably into right or left side of the map, far far far from the mission area). You will make C-130 to fly endlessly until you call it from sensor.

- Sensor activation and C-130 landing: you create a marker and place it on the south of vertical airport road and name it "plane_spawn"; place that marker at a reasonable distance from the airport because plane needs space to perform landing action. Then you create a trigger activated by NATO (if player unit is NATO soldier) or by East (if player unit is commie) and into activation field you write:

Code: [Select]
plane setPos getMarkerPos "plane_spawn"; plane land "land"
NOTE: this trick only works with plane landing in vertical road and flying from South to North direction. For example, if you set your mission in Nogova island which has two airports - one with horizontal road and one with vertical road - plane will land only in the airport with vertical road.
« Last Edit: 17 Jan 2012, 19:56:47 by Guido89 »
? (this == thinkable) : this = scriptable

Offline ahmed117

  • Members
  • *
  • The 3d!t0R -=I.S.I=-
Re: How can a Chopper appear?
« Reply #3 on: 18 Jan 2012, 16:53:11 »
Ok, I got it , it really works. But the problem is as The plane lands... I want all the characters in it to disembark the plane, and use radio..
The 3d!t0R            -=O.F.P.E.C=-                                                         -=I.S.I=-

Re: How can a Chopper appear?
« Reply #4 on: 18 Jan 2012, 19:41:34 »
Quote
Ok, I got it , it really works.

I am happy it worked!

Quote
I want all the characters in it to disembark the plane

About getting all the characters outta plane, you have two solutions:

- Make a script, which we can call "disembarking.sqs", and put following lines:

Code: [Select]
@unitReady plane
{unAssignVehicle plane} forEach [driver plane, gunner plane, crew plane]
exit

- You just assign a name to every passenger (e.g. soldier1, soldier2, soldier3, soldier4 etc.); then you make a script, which we can call "disembarking.sqs", and put following lines:

Code: [Select]
@unitReady plane
{_x leaveVehicle plane} forEach [driver plane, gunner plane, soldier1, soldier2, soldier3, soldier4, etc.]
exit

If one solution doesn't work, other one may do!

Quote
and use radio..

Not sure about what you want to achieve here...
? (this == thinkable) : this = scriptable

Offline ahmed117

  • Members
  • *
  • The 3d!t0R -=I.S.I=-
Re: How can a Chopper appear?
« Reply #5 on: 18 Jan 2012, 20:33:12 »
I meant, that as the plane lands , and when all the characters disembark, the leader of that squad will report to PAPA_BEAR  that they have reached the airport. They will use radio... so if we are using a script, so how can I make that leader use radio (contacting PAPA_BEAR).
The 3d!t0R            -=O.F.P.E.C=-                                                         -=I.S.I=-

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: How can a Chopper appear?
« Reply #6 on: 18 Jan 2012, 20:41:09 »
It depends if you want to use sideRadio or SideChat...

If you're using the former, you'll want to have your script set out like this:

Code: [Select]

alphaleader sideRadio "Radiomessage1"

~5 (insert whatever duration you want here)

[West, "hq"] sideradio "Radiomessage2"


If you're using sidechat, it's like this:

Code: [Select]

alphaleader sidechat "Papabear this is Alpha, we've arrived, over"

~5 (insert whatever duration you want here)

[West, "hq"] sidechat "Received Alpha, welcome back"


Hope this helps

Gruntage
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba