To find the answer to your question, use the search or choose a category to read the related questions.
 
 
Advanced
 
 

Print this article    (0)
Air Refueling Example
This example was created for ArmaHolic by DarkXess. (original idea by kylania)

It is to show how simple "Script Snippets" or "Modules" etc are easy to set up for missions makers
by using and showing in the example form in which it was created.

How to use "Air Refueling Example"

Ok, now to start you need to place a chopper in the editor, in my example ive used a (MH-6J) also (flying).

Put this in the init box:

player action ["autoHover", p1]; titleText ["Bring up your GPS (Right-Ctrl +
M) to help get into position on the Chinook.\n\nWithin 35 meters, 30
degrees of it's rear door, and +/- 5m of it's altitude.","PLAIN"];

And name that chopper "p1"

Now add a another chopper in which ive used a (Chinook CH-45F) and name it "ch47Repair" also (flying).

Then add this in the init box:

trgAirRepairZone attachTo [this,[0,0,0]];scrMarkerPos = [] spawn {while
{not isnull ch47Repair} do { "mrkRepairZone" setmarkerpos getpos
ch47Repair; sleep 0.5; }; };ch47Refitting = false;

Add a short waypoint like ive done in the example with the speed set at "limited".

Now,.. place a trigger in the editor Activation: BLUFOR and with the name "trgAirRepairZone"

With this in the condition:

[position ch47Repair,(getdir ch47Repair) - 180,20,position vehicle player] call BIS_fnc_inAngleSector
&& (getPosATL ch47Repair select 2) + 5 >= getPosATL vehicle player select 2 && (getPosATL ch47Repair
select 2) -5 <= getPosATL vehicle player select 2 && ch47Repair distance vehicle player < 35

This in the On Act:

hint "In position!"; "mrkRepairZone" setMarkerColor "ColorGreen"; "mrkRepairZone"
setMarkerBrushLocal "Solid"; ch47Refitting = true;

And this in the On DEA:

hint "OOP!";"mrkRepairZone" setMarkerColor "ColorOrange"; "mrkRepairZone"
setMarkerBrushLocal "Border"; ch47Refitting = false;

Now .. make a 2nd trigger next to the 1st one, Activation None!

With this in the Condition:

ch47Refitting

And finally this in the On Act:

hint "Refueled!"; vehicle player setfuel 1;

Place a functions module on the map and done! Now you can have Air Refueling.

Take a look at the example mission on how ive done it, thanks.

Air Refueling Example
Back To Top
Updated: Sunday 10th of June 2012 10:06 AM,  Asked By: DarkXess,  viewed 2028 times